tarsnap.1-man.in 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452
  1. .TH TARSNAP 1 "@DATE@" ""
  2. .SH NAME
  3. .ad l
  4. \fB\%tarsnap\fP
  5. \- manipulate remote encrypted backups
  6. .SH SYNOPSIS
  7. .ad l
  8. .br
  9. \fB\%tarsnap\fP
  10. {\fB\-c\fP}
  11. \fB\--keyfile\fP \fIkey-file\fP
  12. \fB\--cachedir\fP \fIcache-dir\fP
  13. \fB\-f\fP \fIarchive-name\fP
  14. [\fIoptions\fP]
  15. [\fIfiles\fP | \fIdirectories\fP]
  16. .br
  17. \fB\%tarsnap\fP
  18. {\fB\-d\fP}
  19. \fB\--keyfile\fP \fIkey-file\fP
  20. \fB\--cachedir\fP \fIcache-dir\fP
  21. \fB\-f\fP \fIarchive-name\fP
  22. [\fIoptions\fP]
  23. .br
  24. \fB\%tarsnap\fP
  25. {\fB\-t\fP | \fB\-x\fP}
  26. \fB\--keyfile\fP \fIkey-file\fP
  27. \fB\-f\fP \fIarchive-name\fP
  28. [\fIoptions\fP]
  29. [\fIpatterns\fP]
  30. .br
  31. \fB\%tarsnap\fP
  32. {\fB\-r\fP}
  33. \fB\--keyfile\fP \fIkey-file\fP
  34. \fB\-f\fP \fIarchive-name\fP
  35. .br
  36. \fB\%tarsnap\fP
  37. {\fB\--list-archives\fP}
  38. \fB\--keyfile\fP \fIkey-file\fP
  39. .br
  40. \fB\%tarsnap\fP
  41. {\fB\--print-stats\fP}
  42. \fB\--keyfile\fP \fIkey-file\fP
  43. \fB\--cachedir\fP \fIcache-dir\fP
  44. [\fB\-f\fP \fIarchive-name\fP]
  45. .br
  46. \fB\%tarsnap\fP
  47. {\fB\--recover\fP}
  48. \fB\--keyfile\fP \fIkey-file\fP
  49. \fB\--cachedir\fP \fIcache-dir\fP
  50. .br
  51. \fB\%tarsnap\fP
  52. {\fB\--fsck\fP}
  53. \fB\--keyfile\fP \fIkey-file\fP
  54. \fB\--cachedir\fP \fIcache-dir\fP
  55. .br
  56. \fB\%tarsnap\fP
  57. {\fB\--fsck-prune\fP}
  58. \fB\--keyfile\fP \fIkey-file\fP
  59. \fB\--cachedir\fP \fIcache-dir\fP
  60. .br
  61. \fB\%tarsnap\fP
  62. {\fB\--initialize-cachedir\fP}
  63. \fB\--keyfile\fP \fIkey-file\fP
  64. \fB\--cachedir\fP \fIcache-dir\fP
  65. .br
  66. \fB\%tarsnap\fP
  67. {\fB\--nuke\fP}
  68. \fB\--keyfile\fP \fIkey-file\fP
  69. .br
  70. \fB\%tarsnap\fP
  71. \fB\--verify-config\fP
  72. .br
  73. \fB\%tarsnap\fP
  74. \fB\--version\fP
  75. .SH DESCRIPTION
  76. .ad l
  77. \fB\%tarsnap\fP
  78. creates, reads, deletes, and otherwise manages online backups.
  79. .PP
  80. The first option to
  81. \fB\%tarsnap\fP
  82. is a mode indicator from the following list:
  83. .RS 5
  84. .TP
  85. \fB\-c\fP
  86. Create an archive containing the specified items and name.
  87. .TP
  88. \fB\-d\fP
  89. Delete the specified archive.
  90. .TP
  91. \fB\-t\fP
  92. List archive contents to stdout.
  93. .TP
  94. \fB\-x\fP
  95. Extract to disk from the archive.
  96. .TP
  97. \fB\-r\fP
  98. Read the specified archive, convert it to a tar stream, and write it
  99. to stdout.
  100. .TP
  101. \fB\--list-archives\fP
  102. Print the names of archives stored.
  103. If the
  104. \fB\-v\fP
  105. flag is specified one or more times, the creation
  106. time of each archive is also printed;
  107. if the
  108. \fB\-v\fP
  109. flag is specified two or more times, the command
  110. line with which
  111. \fB\%tarsnap\fP
  112. was invoked to create each archive is also printed.
  113. .PP
  114. If the
  115. \fB\--null\fP
  116. argument is also specified, each archive name will be separated by a single
  117. null character.
  118. If the
  119. \fB\-v\fP
  120. flag is also specified, then the creation time will be separated by two null
  121. characters.
  122. If the
  123. \fB\-v\fP
  124. flag is specified two times, then the arguments in the command line will be
  125. separated by three null characters.
  126. .TP
  127. \fB\--print-stats\fP
  128. Print global statistics concerning the archives stored, and optionally
  129. information about individual archive(s).
  130. See "PRINTING ARCHIVE STATISTICS" below for information on the output format.
  131. .TP
  132. \fB\--recover\fP
  133. Recover a partial archive from a checkpoint if such an archive exists.
  134. This is also done automatically the next time an archive is created
  135. or deleted.
  136. .TP
  137. \fB\--fsck\fP
  138. Perform some integrity checks on the archives stored, and reconstruct the
  139. cache directory
  140. \fIcache-dir\fP.
  141. In the unlikely event that there are corrupted archives,
  142. \fB\%tarsnap\fP
  143. will exit and request that it be run with the
  144. \fB\--fsck-prune\fP
  145. option.
  146. .TP
  147. \fB\--fsck-prune\fP
  148. Run as
  149. \fB\--fsck\fP,
  150. but if corrupt archives are detected, prune the broken data.
  151. .TP
  152. \fB\--initialize-cachedir\fP
  153. Create and initialize the cachedir.
  154. This option is intended for the GUI and is not needed for command-line usage.
  155. .TP
  156. \fB\--nuke\fP
  157. Delete all of the archives stored.
  158. To protect against accidental data loss,
  159. \fB\%tarsnap\fP
  160. will ask you to type the text "No Tomorrow" when using the
  161. \fB\--nuke\fP
  162. command.
  163. .TP
  164. \fB\--verify-config\fP
  165. Check the configuration file(s) for syntactic errors.
  166. .TP
  167. \fB\--version\fP
  168. Print version number of
  169. \fB\%tarsnap\fP,
  170. and exit.
  171. .RE
  172. .PP
  173. In
  174. \fB\-c\fP
  175. mode, each specified file or directory is added to the
  176. archive in the order specified on the command line.
  177. By default, the contents of each directory are also archived.
  178. .PP
  179. In
  180. \fB\-t\fP
  181. or
  182. \fB\-x\fP
  183. mode, the entire command line
  184. is read and parsed before the archive is opened.
  185. The pathnames or patterns on the command line indicate
  186. which items in the archive should be processed.
  187. Patterns are shell-style globbing patterns as
  188. documented in
  189. \fBtcsh\fP(1).
  190. Note that these follow the POSIX rules for pattern matching, e.g.,
  191. `[]'
  192. are special characters which can be escaped with a backslash.
  193. .PP
  194. Two concurrent create or delete operations may not be performed with the same
  195. key.
  196. Extracting or listing archives may be performed in parallel with any other
  197. operation.
  198. .SH OPTIONS
  199. .ad l
  200. .RS 5
  201. .TP
  202. \fB@\fP\fIarchive-file\fP
  203. (c mode only)
  204. The specified archive file is read and the entries
  205. in it will be appended to the current archive.
  206. If
  207. \fIarchive-file\fP
  208. is
  209. ``-''
  210. then the archive will be read from the standard input.
  211. As an example,
  212. .RS 4
  213. \fB\%tarsnap\fP \fB\-c\fP \fB\--keyfile\fP \fIkey-file\fP \fB\--cachedir\fP \fIcache-dir\fP \fB\-f\fP \fImybackup\fP \fB@\fP\fIbackup.tar\fP
  214. .RE
  215. reads the archive file
  216. \fIbackup.tar\fP
  217. from disk and stores it using
  218. \fB\%tarsnap\fP.
  219. .TP
  220. \fB@@\fP\fIarchive-name\fP
  221. (c mode only)
  222. The specified
  223. \fB\%tarsnap\fP
  224. archive is read and the entries in it will be
  225. appended to the current archive.
  226. .TP
  227. \fB\--aggressive-networking\fP
  228. (c mode only)
  229. Use multiple TCP connections to send data to the
  230. \fB\%tarsnap\fP
  231. server.
  232. If the upload rate is congestion-limited rather than
  233. being limited by individual bottleneck(s), this may
  234. allow tarsnap to use a significantly larger fraction
  235. of the available bandwidth, at the expense of slowing
  236. down any other network traffic.
  237. .TP
  238. \fB\--archive-names\fP \fIfilename\fP
  239. Read a list of archive names from
  240. \fIfilename\fP.
  241. .TP
  242. \fB\-C\fP \fIdirectory\fP
  243. (c and x modes only)
  244. In c mode, this changes the directory before adding
  245. the following files.
  246. In x mode, change directories after opening the archive
  247. but before extracting entries from the archive.
  248. .TP
  249. \fB\--cachedir\fP \fIcache-dir\fP
  250. (c, d, print-stats, and fsck modes only)
  251. Cache information about the archives stored by
  252. \fB\%tarsnap\fP
  253. in the directory
  254. \fIcache-dir\fP.
  255. The contents of this directory will not be backed up by
  256. \fB\%tarsnap\fP,
  257. so it should not be used for any other purpose.
  258. If the directory
  259. \fIcache-dir\fP
  260. is lost, it can be reconstructed by running
  261. \fB\%tarsnap\fP \fB\--fsck\fP.
  262. .TP
  263. \fB\--check-links\fP
  264. (c mode only)
  265. Issue a warning message unless all links to each file are archived.
  266. .TP
  267. \fB\--checkpoint-bytes\fP \fIbytespercheckpoint\fP
  268. (c mode only)
  269. Create a checkpoint after every
  270. \fIbytespercheckpoint\fP
  271. bytes of uploaded data.
  272. The value
  273. \fIbytespercheckpoint\fP
  274. must be at least 1000000, and a higher value is recommended since
  275. creating a checkpoint in an archive can take a few seconds and several
  276. hundred kB of bandwidth.
  277. .TP
  278. \fB\--chroot\fP
  279. (x mode only)
  280. \fB\%chroot\fP()
  281. to the current directory after processing any
  282. \fB\-C\fP
  283. options and before extracting any files.
  284. .TP
  285. \fB\--configfile\fP \fIfilename\fP
  286. Add
  287. \fIfilename\fP
  288. to the list of configuration files to be read; options set via these take
  289. priority over the default configuration files.
  290. This option can be specified multiple times, in which case all the files
  291. will be read; where settings conflict, the earlier configuration file will
  292. take priority.
  293. .TP
  294. \fB\--creationtime\fP \fIX\fP
  295. (c mode only)
  296. Manually specify a creation time (a unix timestamp) for the archive.
  297. This is unlikely to be useful when tarsnap is being invoked directly from the
  298. command line.
  299. .TP
  300. \fB\--csv-file\fP \fIfilename\fP
  301. (use with
  302. \fB\--print-stats\fP)
  303. Write statistics in CSV format to a file.
  304. .TP
  305. \fB\--disk-pause\fP \fIX\fP
  306. (c mode only)
  307. Pause for
  308. \fIX\fP
  309. ms between storing archive entries and after every 64 kB of file data.
  310. This will slow down
  311. \fB\%tarsnap\fP
  312. and thereby reduce its impact on other applications.
  313. For archiving files which are stored on an ATA disk and are not in the
  314. operating system disk cache, a value of
  315. \fB\--disk-pause\fP \fI10\fP
  316. will approximately double the time taken.
  317. .TP
  318. \fB\--dry-run\fP
  319. (c mode only)
  320. Don't really create an archive; just simulate doing so.
  321. The list of paths added to an archive (if the
  322. \fB\-v\fP
  323. option is used), progress messages (if the
  324. \fB\--progress-bytes\fP
  325. option is used), and final statistics printed (if the
  326. \fB\--print-stats\fP
  327. option is used) will be almost identical (typically
  328. within a few kB or a fraction of a percent) to if
  329. \fB\%tarsnap\fP
  330. is run without the
  331. \fB\--dry-run\fP
  332. option.
  333. .PP
  334. Note that the
  335. \fB\--maxbw\fP
  336. option does not work in combination with
  337. \fB\--dry-run\fP,
  338. since no bandwidth is actually used, and that since
  339. \fB\%tarsnap\fP
  340. does not contact the
  341. \fB\%tarsnap\fP
  342. server when performing a dry run, it will not detect an
  343. attempt to create an archive with the same name as one
  344. which already exists.
  345. If an existing archive is being copied via
  346. \fB@@\fP\fIarchive-name\fP,
  347. then some network bandwidth will be used while
  348. \fB\%tarsnap\fP
  349. reads metadata about
  350. \fIarchive-name\fP
  351. from the tarsnap server.
  352. .PP
  353. Furthermore,
  354. \fB\--dry-run\fP
  355. will not check whether the cache directory is out of sync.
  356. .TP
  357. \fB\--dry-run-metadata\fP
  358. (c mode only)
  359. Don't really create an archive; just simulate doing so.
  360. This is similar to
  361. \fB\--dry-run\fP,
  362. except that it doesn't read any files; it only processes filesystem metadata.
  363. .PP
  364. This is significantly faster than a regular
  365. \fB\--dry-run\fP,
  366. but it is still suitable for checking which filesystem entries will be
  367. archived (with
  368. \fB\-v\fP),
  369. or getting the total uncompressed archive size (via
  370. \fB\--totals\fP
  371. or
  372. \fB\--progress-bytes\fP).
  373. .PP
  374. This option cannot be used with
  375. \fB\--print-stats\fP.
  376. .TP
  377. \fB\--dump-config\fP
  378. Print out the command-line and all non-blank lines read from config files.
  379. .TP
  380. \fB\--exclude\fP \fIpattern\fP
  381. (c, x, and t modes only)
  382. Do not process files or directories that match the
  383. specified pattern.
  384. Note that exclusions take precedence over patterns or filenames
  385. specified on the command line.
  386. .TP
  387. \fB\-f\fP \fIarchive-name\fP
  388. (c, d, x, t, r, list-archives, and print-stats modes only)
  389. Operate on the archive
  390. \fIarchive-name\fP.
  391. In mode c, if archive creation is interrupted by \&^Q,
  392. the SIGQUIT signal, or reaching the bandwidth limit
  393. specified via a
  394. \fB\--maxbw\fP
  395. option, the archive will be stored with
  396. ".part" appended to its name.
  397. In mode print-stats, if
  398. \fIarchive-name\fP
  399. is *, statistics will be printed for every archive.
  400. In the print-stats and d modes,
  401. \fB\-f\fP \fIarchive-name\fP
  402. can be specified multiple times, in which case the operation
  403. (printing statistics, or deletion) will be performed for each
  404. of the specified archives.
  405. .PP
  406. Note that each archive created must have a different name; consequently
  407. many users find it useful to include timestamps in archive names when
  408. repeatedly creating archives from the same files/directories (e.g.,
  409. daily backups).
  410. .PP
  411. As a special case, if used with
  412. \fB\--list-archives\fP -hashes
  413. then
  414. \fB\-f\fP
  415. indicates a
  416. \fItapehash\fP
  417. instead of an
  418. \fIarchive-name\fP,
  419. and will print metadata about the specified archive(s).
  420. This combination of options is intended for the GUI and is not needed for
  421. command-line usage.
  422. Po \fB\-f\fP
  423. cannot be used with
  424. \fB\--list-archives\fP
  425. if it does not also include
  426. \fB\--hashes\fP.
  427. Pc
  428. .TP
  429. \fB\--force-resources\fP
  430. Force the decryption of a passphrase-encrypted key file to proceed
  431. even if it is anticipated to require an excessive amount of memory
  432. or CPU time.
  433. .TP
  434. \fB\-H\fP
  435. (c mode only)
  436. Symbolic links named on the command line will be followed; the
  437. target of the link will be archived, not the link itself.
  438. .TP
  439. \fB\-h\fP
  440. (c mode only)
  441. Synonym for
  442. \fB\-L\fP.
  443. .TP
  444. \fB\--hashes\fP
  445. (list-archives mode only)
  446. Print hashes of archive names.
  447. If the
  448. \fB\-v\fP
  449. flag is specified one or more times, print the archive name as well.
  450. .PP
  451. This option is intended for the GUI and is not needed for command-line usage.
  452. .TP
  453. \fB\--humanize-numbers\fP
  454. Use SI prefixes to make numbers printed by
  455. \fB\--print-stats\fP
  456. and SIGINFO more readable.
  457. .TP
  458. \fB\-I\fP
  459. Synonym for
  460. \fB\-T\fP.
  461. .TP
  462. \fB\--include\fP \fIpattern\fP
  463. (c, x, and t modes only)
  464. Process only files or directories that match the specified pattern.
  465. Note that exclusions specified with
  466. \fB\--exclude\fP
  467. take precedence over inclusions.
  468. If no inclusions are explicitly specified, all entries are processed by
  469. default.
  470. The
  471. \fB\--include\fP
  472. option is especially useful when filtering archives.
  473. For example, the command
  474. .RS 4
  475. \fB\%tarsnap\fP \fB\-c\fP \fB\-f\fP \fIfoo-backup\fP \fB\--include='*foo*'\fP \fB@@\fP\fIall-backup\fP
  476. .RE
  477. creates a new archive
  478. \fIfoo-backup\fP
  479. containing only the entries from
  480. \fIall-backup\fP
  481. containing the string
  482. `foo'.
  483. .TP
  484. \fB\--insane-filesystems\fP
  485. (c mode only)
  486. Allow descent into synthetic filesystems such as procfs.
  487. Normally archiving of such filesystems is a silly thing to do, hence the
  488. name of the option.
  489. .TP
  490. \fB\--iso-dates\fP
  491. (t mode only)
  492. Print file and directory dates as yyyy-mm-dd hh:mm:ss.
  493. .PP
  494. The default is to use the same format as 'ls -l': If the files were modified
  495. within the past six months, print the month, day, hour, and minutes; otherwise,
  496. print the month, day, and year.
  497. .TP
  498. \fB\-k\fP
  499. (x mode only)
  500. Do not overwrite existing files.
  501. In particular, if a file appears more than once in an archive,
  502. later copies will not overwrite earlier copies.
  503. .TP
  504. \fB\--keep-going\fP
  505. (d and print-stats modes only)
  506. Continue deleting or printing statistics after finding that one
  507. of the archives specified does not exist.
  508. .TP
  509. \fB\--keep-newer-files\fP
  510. (x mode only)
  511. Do not overwrite existing files that are newer than the
  512. versions appearing in the archive being extracted.
  513. .TP
  514. \fB\--keyfile\fP \fIkey-file\fP
  515. (all modes)
  516. Obtain encryption, authentication, and access keys from
  517. \fIkey-file\fP.
  518. This file should have been generated by
  519. \fBtarsnap-keygen\fP(1).
  520. .TP
  521. \fB\-L\fP
  522. (c mode only)
  523. All symbolic links will be followed.
  524. Normally, symbolic links are archived as such.
  525. With this option, the target of the link will be archived instead.
  526. .TP
  527. \fB\-l\fP
  528. This is a synonym for the
  529. \fB\--check-links\fP
  530. option.
  531. .TP
  532. \fB\--lowmem\fP
  533. (c mode only)
  534. Reduce memory usage by not caching small files.
  535. This may be useful when backing up files of average size less
  536. than 1 MB if the available RAM in kilobytes is less than the
  537. number of files being backed up.
  538. .TP
  539. \fB\-m\fP
  540. (x mode only)
  541. Do not extract modification time.
  542. By default, the modification time is set to the time stored in the archive.
  543. .TP
  544. \fB\--maxbw\fP \fInumbytes\fP
  545. (c mode only)
  546. Interrupt archival if more than
  547. \fInumbytes\fP
  548. bytes of upstream bandwidth is used (see INTERRUPTING ARCHIVAL
  549. below for details).
  550. .TP
  551. \fB\--maxbw-rate\fP \fIbytespersecond\fP
  552. Limit download and upload bandwidth used to
  553. \fIbytespersecond\fP
  554. bytes per second.
  555. .TP
  556. \fB\--maxbw-rate-down\fP \fIbytespersecond\fP
  557. Limit download bandwidth used to
  558. \fIbytespersecond\fP
  559. bytes per second.
  560. .TP
  561. \fB\--maxbw-rate-up\fP \fIbytespersecond\fP
  562. Limit upload bandwidth used to
  563. \fIbytespersecond\fP
  564. bytes per second.
  565. .TP
  566. \fB\-n\fP
  567. (c mode only)
  568. Do not recursively archive the contents of directories.
  569. .TP
  570. \fB\--newer\fP \fIdate\fP
  571. (c, x, t modes only)
  572. Only include files and directories newer than the specified date.
  573. This compares ctime entries.
  574. .TP
  575. \fB\--newer-mtime\fP \fIdate\fP
  576. (c mode only)
  577. Like
  578. \fB\--newer\fP,
  579. except it compares mtime entries instead of ctime entries.
  580. .TP
  581. \fB\--newer-than\fP \fIfilename\fP
  582. (c mode only)
  583. Only include files and directories newer than the specified file.
  584. This compares ctime entries.
  585. .TP
  586. \fB\--newer-mtime-than\fP \fIfilename\fP
  587. (c mode only)
  588. Like
  589. \fB\--newer-than\fP,
  590. except it compares mtime entries instead of ctime entries.
  591. .TP
  592. \fB\--no-aggressive-networking\fP
  593. Ignore any
  594. \fBaggressive-networking\fP
  595. option specified in a configuration file.
  596. .TP
  597. \fB\--no-config-exclude\fP
  598. Ignore any
  599. \fBexclude\fP
  600. option specified in a configuration file.
  601. Normally
  602. \fBexclude\fP
  603. options specified via configuration files and the command line
  604. all take effect.
  605. .TP
  606. \fB\--no-config-include\fP
  607. Ignore any
  608. \fBinclude\fP
  609. option specified in a configuration file.
  610. Normally
  611. \fBinclude\fP
  612. options specified via configuration files and the command line
  613. all take effect.
  614. .TP
  615. \fB\--no-default-config\fP
  616. Do not read the default configuration files
  617. \fI@sysconfdir@/tarsnap.conf\fP,
  618. \fI$XDG_CONFIG_HOME/tarsnap/tarsnap.conf\fP,
  619. and
  620. \fI~/.tarsnaprc\fP.
  621. .TP
  622. \fB\--no-disk-pause\fP
  623. Ignore any
  624. \fBdisk-pause\fP
  625. option specified in a configuration file.
  626. .TP
  627. \fB\--no-force-resources\fP
  628. Ignore any
  629. \fBforce-resources\fP
  630. option specified in a configuration file.
  631. .TP
  632. \fB\--no-humanize-numbers\fP
  633. Ignore any
  634. \fBhumanize-numbers\fP
  635. option specified in a configuration file.
  636. .TP
  637. \fB\--no-insane-filesystems\fP
  638. Ignore any
  639. \fBinsane-filesystems\fP
  640. option specified in a configuration file.
  641. .TP
  642. \fB\--no-iso-dates\fP
  643. Ignore any
  644. \fBiso-dates\fP
  645. option specified in a configuration file.
  646. .TP
  647. \fB\--no-maxbw\fP
  648. Ignore any
  649. \fBmaxbw\fP
  650. option specified in a configuration file.
  651. .TP
  652. \fB\--no-maxbw-rate-down\fP
  653. Ignore any
  654. \fBmaxbw-rate-down\fP
  655. option specified in a configuration file.
  656. If a
  657. \fBmaxbw-rate\fP
  658. option is specified in a configuration file, it will
  659. not affect the download bandwidth used, but may affect
  660. the upload bandwidth used (unless
  661. \fB\--no-maxbw-rate-up\fP
  662. is also specified).
  663. .TP
  664. \fB\--no-maxbw-rate-up\fP
  665. Ignore any
  666. \fBmaxbw-rate-up\fP
  667. option specified in a configuration file.
  668. If a
  669. \fBmaxbw-rate\fP
  670. option is specified in a configuration file, it will
  671. not affect the upload bandwidth used, but may affect
  672. the download bandwidth used (unless
  673. \fB\--no-maxbw-rate-down\fP
  674. is also specified).
  675. .TP
  676. \fB\--no-nodump\fP
  677. Ignore any
  678. \fBnodump\fP
  679. option specified in a configuration file.
  680. .TP
  681. \fB\--no-print-stats\fP
  682. Ignore any
  683. \fBprint-stats\fP
  684. option specified in a configuration file.
  685. .TP
  686. \fB\--no-progress-bytes\fP
  687. Ignore any
  688. \fBprogress-bytes\fP
  689. option specified in a configuration file.
  690. .TP
  691. \fB\--no-quiet\fP
  692. Ignore any
  693. \fBquiet\fP
  694. option specified in a configuration file.
  695. .TP
  696. \fB\--no-retry-forever\fP
  697. Ignore any
  698. \fBretry-forever\fP
  699. option specified in a configuration file.
  700. .TP
  701. \fB\--no-snaptime\fP
  702. Ignore any
  703. \fBsnaptime\fP
  704. option specified in a configuration file.
  705. .TP
  706. \fB\--no-store-atime\fP
  707. Ignore any
  708. \fBstore-atime\fP
  709. option specified in a configuration file.
  710. .TP
  711. \fB\--no-totals\fP
  712. Ignore any
  713. \fBtotals\fP
  714. option specified in a configuration file.
  715. .TP
  716. \fB\--nodump\fP
  717. (c mode only)
  718. Honor the nodump file flag by skipping this file or directory.
  719. .TP
  720. \fB\--noisy-warnings\fP
  721. Be verbose when warning about network glitches.
  722. This is probably only useful for debugging purposes.
  723. .TP
  724. \fB\--normalmem\fP
  725. Ignore any
  726. \fBlowmem\fP
  727. or
  728. \fBverylowmem\fP
  729. option specified in a configuration file.
  730. .TP
  731. \fB\--null\fP
  732. (use with
  733. \fB\-I\fP,
  734. \fB\-T\fP,
  735. \fB\-X\fP,
  736. or list-archives modes only)
  737. Filenames or patterns are separated by null characters,
  738. not by newlines.
  739. This is often used to read filenames output by the
  740. \fB\-print0\fP
  741. option to
  742. \fBfind\fP(1).
  743. .TP
  744. \fB\--numeric-owner\fP
  745. (x mode only)
  746. Ignore symbolic user and group names when restoring archives to disk,
  747. only numeric uid and gid values will be obeyed.
  748. .TP
  749. \fB\-O\fP
  750. (x and t modes only)
  751. In extract (-x) mode, files will be written to standard out rather than
  752. being extracted to disk.
  753. In list (-t) mode, the file listing will be written to stderr rather than
  754. the usual stdout.
  755. .TP
  756. \fB\-o\fP
  757. (x mode only)
  758. Use the user and group of the user running the program rather
  759. than those specified in the archive.
  760. Note that this has no significance unless
  761. \fB\-p\fP
  762. is specified, and the program is being run by the root user.
  763. In this case, the file modes and flags from
  764. the archive will be restored, but ACLs or owner information in
  765. the archive will be discarded.
  766. .TP
  767. \fB\--one-file-system\fP
  768. (c mode only)
  769. Do not cross mount points.
  770. .TP
  771. \fB\-P\fP
  772. (c, x, and t modes only)
  773. Preserve pathnames.
  774. By default, absolute pathnames (those that begin with a /
  775. character) have the leading slash removed both when creating archives
  776. and extracting from them.
  777. Also,
  778. \fB\%tarsnap\fP
  779. will refuse to extract archive entries whose pathnames contain
  780. \fI\& ..\fP
  781. or whose target directory would be altered by a symlink.
  782. This option suppresses these behaviors.
  783. .TP
  784. \fB\-p\fP
  785. (x mode only)
  786. Preserve file permissions.
  787. Attempt to restore the full permissions, including owner, file modes, file
  788. flags and ACLs, if available, for each item extracted from the archive.
  789. By default, newly-created files are owned by the user running
  790. \fB\%tarsnap\fP,
  791. the file mode is restored for newly-created regular files, and
  792. all other types of entries receive default permissions.
  793. If
  794. \fB\%tarsnap\fP
  795. is being run by root, the default is to restore the owner unless the
  796. \fB\-o\fP
  797. option is also specified.
  798. .TP
  799. \fB\--passphrase\fP \fImethod:arg\fP
  800. Read the passphrase using the specified method.
  801. .RS 5
  802. .TP
  803. \fIdev:tty-stdin\fP
  804. Attempt to read the passphrase from /dev/tty; if that fails, read it from stdin.
  805. This is the default behaviour.
  806. .TP
  807. \fIdev:stdin-once\fP
  808. Attempt to read the passphrase from stdin, and do so only once even when
  809. encrypting.
  810. This cannot be used if
  811. \fIinfile\fP
  812. is also stdin (aka '-').
  813. .TP
  814. \fIdev:tty-once\fP
  815. Attempt to read the passphrase from /dev/tty, and do so only once
  816. even when encrypting.
  817. .TP
  818. \fIenv:VAR\fP
  819. Read the passphrase from the environment variable specified by
  820. \fIVAR\fP.
  821. .PP
  822. Bf .IR
  823. Storing a passphrase in an environment variable may be a security risk.
  824. Ef
  825. Only use this option if you are certain that you know what you are doing.
  826. .TP
  827. \fIfile:FILENAME\fP
  828. Read the passphrase from the file specified by
  829. \fIFILENAME\fP.
  830. .PP
  831. Bf .IR
  832. Storing a passphrase in a file may be a security risk.
  833. Ef
  834. Only use this option if you are certain that you know what you are doing.
  835. .RE
  836. .TP
  837. \fB\--print-stats\fP
  838. (c and d modes only)
  839. Print statistics for the archive being created (c mode) or delete (d mode).
  840. See "PRINTING ARCHIVE STATISTICS" below for information on the output format.
  841. .TP
  842. \fB\--progress-bytes\fP \fIX\fP
  843. Display a progress message (as if generated from SIGUSR1 or SIGINFO) after
  844. processing each
  845. \fIX\fP
  846. bytes.
  847. Occurs at most once per file.
  848. .TP
  849. \fB\-q\fP (\fB\--fast-read\fP)
  850. (x and t modes only)
  851. Extract or list only the first archive entry that matches each pattern
  852. or filename operand.
  853. Exit as soon as each specified pattern or filename has been matched.
  854. By default, the archive is always read to the very end, since
  855. there can be multiple entries with the same name and, by convention,
  856. later entries overwrite earlier entries.
  857. This option is provided as a performance optimization.
  858. .TP
  859. \fB\--quiet\fP
  860. Avoid printing some warnings.
  861. Currently the warnings which are silenced by this option are
  862. "Removing leading '/' ...",
  863. "Not adding cache directory to archive",
  864. "... file may have grown while being archived",
  865. and
  866. "Skipping entry on filesystem of type ...",
  867. but it is likely that other
  868. warnings will be silenced by this option in future versions of
  869. \fB\%tarsnap\fP.
  870. .TP
  871. \fB\--resume-extract\fP
  872. (x mode only)
  873. Don't extract files whose filesize and mtime matches existing files on the
  874. disk.
  875. Primarily used to resume an archive extraction which was interrupted.
  876. The mtime comparison ignores sub-second timestamp precision, as this is not
  877. supported on all filesystems.
  878. This differs from
  879. \fB\-k\fP
  880. in that
  881. \fB\--resume-extract\fP
  882. will overwrite a file if the size or modification time do not match, as can
  883. happen if tarsnap is killed partway through extracting a file.
  884. .TP
  885. \fB\--retry-forever\fP
  886. This option causes tarsnap to continue trying to reconnect to the
  887. tarsnap server forever, instead of giving up after 5-10 minutes.
  888. This may be useful for people with excessively flaky networks, or
  889. on mobile devices which regularly lose their internet connections
  890. for extended periods of time.
  891. This is not enabled by default since continued failures generally indicate a
  892. problem which should be investigated by the user.
  893. .TP
  894. \fB\-S\fP
  895. (x mode only)
  896. Extract files as sparse files.
  897. For every block on disk, check first if it contains any non-NULL bytes and seek
  898. over it otherwise.
  899. This works similar to the conv=sparse option of dd.
  900. .TP
  901. \fB\-s\fP \fIpattern\fP
  902. Modify file or archive member names according to
  903. \fIpattern\fP.
  904. The pattern has the format /old/new/[gps].
  905. old is a basic regular expression.
  906. If it doesn't apply, the pattern is skipped.
  907. new is the replacement string of the matched part.
  908. ~ is substituted with the match, \e1 to \e9 with the contents of
  909. the corresponding captured group.
  910. The optional trailing g specifies that matching should continue
  911. after the matched part and stop on the first unmatched pattern.
  912. The optional trailing s specifies that the pattern applies to the value
  913. of symbolic links.
  914. The optional trailing p specifies that after a successful substitution
  915. the original path name and the new path name should be printed to
  916. standard error.
  917. .TP
  918. \fB\--snaptime\fP \fIfilename\fP
  919. (c mode only)
  920. This option MUST be specified when creating a backup from a filesystem
  921. snapshot, and
  922. \fIfilename\fP
  923. must have a modification time prior to when the filesystem snapshot was
  924. created.
  925. (This is necessary to prevent races between file modification and snapshot
  926. creation which could result in
  927. \fB\%tarsnap\fP
  928. failing to recognize that a file has been modified.)
  929. .TP
  930. \fB\--store-atime\fP
  931. (c mode only)
  932. Enable the storing of file access times.
  933. The default behaviour of
  934. \fB\%tarsnap\fP
  935. is to not store file access times, since this can cause a significant amount
  936. of bandwidth and storage to be wasted when the same set of files are archived
  937. several times (e.g., if daily backup archives are created) due to
  938. \fB\%tarsnap\fP
  939. itself accessing files and thereby causing their access times to be changed.
  940. .TP
  941. \fB\--strip-components\fP \fIcount\fP
  942. (x mode only)
  943. Remove the specified number of leading path elements.
  944. Pathnames with fewer elements will be silently skipped.
  945. Note that the pathname is edited after checking inclusion/exclusion patterns
  946. but before security checks.
  947. .TP
  948. \fB\-T\fP \fIfilename\fP
  949. (c, x, and t modes only)
  950. In x or t mode,
  951. \fB\%tarsnap\fP
  952. will read the list of names to be extracted from
  953. \fIfilename\fP.
  954. In c mode,
  955. \fB\%tarsnap\fP
  956. will read names to be archived from
  957. \fIfilename\fP.
  958. The special name
  959. ``-C''
  960. on a line by itself will cause the current directory to be changed to
  961. the directory specified on the following line.
  962. Names are terminated by newlines unless
  963. \fB\--null\fP
  964. is specified.
  965. Note that
  966. \fB\--null\fP
  967. also disables the special handling of lines containing
  968. ``-C''.
  969. If
  970. \fIfilename\fP
  971. is
  972. ``-''
  973. then the list of names will be read from the standard input.
  974. Note: If you are generating lists of files using
  975. \fBfind\fP(1),
  976. you probably want to use
  977. \fB\-n\fP
  978. as well.
  979. .TP
  980. \fB\--totals\fP
  981. (c mode only)
  982. Print the size of the archive after creating it.
  983. This option is provided mainly for compatibility with GNU tar; in most
  984. situations the
  985. \fB\--print-stats\fP
  986. option will be far more useful.
  987. .TP
  988. \fB\-U\fP
  989. (x mode only)
  990. Unlink files before creating them.
  991. Without this option,
  992. \fB\%tarsnap\fP
  993. overwrites existing files, which preserves existing hardlinks.
  994. With this option, existing hardlinks will be broken, as will any
  995. symlink that would affect the location of an extracted file.
  996. .TP
  997. \fB\-v\fP
  998. (c, d, t, x, and list-archives modes only)
  999. Produce verbose output.
  1000. In create and extract modes,
  1001. \fB\%tarsnap\fP
  1002. will list each file name as it is read from or written to
  1003. the archive.
  1004. In delete mode,
  1005. \fB\%tarsnap\fP
  1006. will list the name of each archive as it is deleted.
  1007. In list mode,
  1008. \fB\%tarsnap\fP
  1009. will produce output similar to that of
  1010. \fBls\fP(1).
  1011. Additional
  1012. \fB\-v\fP
  1013. options will provide additional detail.
  1014. .TP
  1015. \fB\--verify-config\fP
  1016. Check the configuration file(s) for syntactic errors.
  1017. .TP
  1018. \fB\--version\fP
  1019. Print version number of
  1020. \fB\%tarsnap\fP,
  1021. and exit.
  1022. .TP
  1023. \fB\--verylowmem\fP
  1024. (c mode only)
  1025. Reduce memory usage, by approximately a factor of 2 beyond
  1026. the memory usage when
  1027. \fB\--lowmem\fP
  1028. is specified, by not caching anything.
  1029. .TP
  1030. \fB\-w\fP
  1031. (c and x modes only)
  1032. Ask for confirmation for every action.
  1033. .TP
  1034. \fB\-X\fP \fIfilename\fP
  1035. (c, x, and t modes only)
  1036. Read a list of exclusion patterns from the specified file.
  1037. See
  1038. \fB\--exclude\fP
  1039. for more information about the handling of exclusions.
  1040. .RE
  1041. .SH SIGNALS
  1042. .ad l
  1043. \fB\%tarsnap\fP
  1044. handles the following signals:
  1045. .RS 5
  1046. .TP
  1047. SIGUSR1 & SIGINFO
  1048. On receipt of the SIGUSR1 signal or (on platforms where it exists) the
  1049. SIGINFO signal,
  1050. \fB\%tarsnap\fP
  1051. prints the current file or directory being processed, and (for files)
  1052. its progress within the file.
  1053. It also prints the number of files and the number of uncompressed bytes
  1054. processed.
  1055. Note that due to network buffering the file position will not align precisely
  1056. with how much data has been sent to or received from the
  1057. \fB\%tarsnap\fP
  1058. server.
  1059. .TP
  1060. SIGSTOP & SIGTSTP
  1061. On receipt of a SIGSTOP or SIGTSTP signal, the kernel will suspend the
  1062. \fB\%tarsnap\fP
  1063. process.
  1064. Upon receiving a SIGCONT signal,
  1065. \fB\%tarsnap\fP
  1066. will reconnect to the server (if necessary) and continue the specified task.
  1067. .TP
  1068. SIGUSR2
  1069. On receipt of the SIGUSR2 signal, if
  1070. \fB\%tarsnap\fP
  1071. is creating an archive (mode c), it will create a checkpoint at the
  1072. current position.
  1073. .TP
  1074. SIGQUIT
  1075. On receipt of the SIGQUIT signal, if
  1076. \fB\%tarsnap\fP
  1077. is creating an archive (mode c) it will truncate the archive at the
  1078. current position and exit (see "INTERRUPTING ARCHIVAL" below).
  1079. .RE
  1080. .SH PRINTING ARCHIVE STATISTICS
  1081. .ad l
  1082. There are four commands which print statistics about archives:
  1083. .RS 5
  1084. .IP \(bu
  1085. Global statistics:
  1086. .RS 4
  1087. \fB\%tarsnap\fP \fB\--print-stats\fP
  1088. .RE
  1089. .IP \(bu
  1090. Global statistics and info about specific archive(s):
  1091. .RS 4
  1092. \fB\%tarsnap\fP \fB\--print-stats\fP \fB\-f\fP \fIarchive-name1\fP [\fB\-f\fP \fI...\fP]
  1093. .RE
  1094. .IP \(bu
  1095. Global statistics and info about all archives:
  1096. .RS 4
  1097. \fB\%tarsnap\fP \fB\--print-stats\fP \fB\-f\fP \fI'*'\fP
  1098. .RE
  1099. .IP \(bu
  1100. Global statistics and info about the archive(s) that were just created or
  1101. deleted:
  1102. .RS 4
  1103. \fB\%tarsnap\fP \fB\-c\fP \fB\--print-stats\fP \fB\-f\fP \fIarchive-name\fP \fIDIR\fP
  1104. .RE
  1105. .RS 4
  1106. \fB\%tarsnap\fP \fB\-d\fP \fB\--print-stats\fP \fB\-f\fP \fIarchive-name1\fP [\fB\-f\fP \fI...\fP]
  1107. .RE
  1108. .RE
  1109. .PP
  1110. \fB\%tarsnap\fP
  1111. will print a table in the following format:
  1112. .RS 4
  1113. .nf
  1114. Total size Compressed size
  1115. All archives 104491640436 51510524844
  1116. (unique data) 14830618089 7733620463
  1117. This archive 808723344 289077325
  1118. New data 17858641 5658308
  1119. .RE
  1120. .PP
  1121. In this example, the combined size of all archives stored by
  1122. \fB\%tarsnap\fP
  1123. using the same keys is 104 GB, and the combined size post-compression
  1124. would be 51 GB; but after removing duplicate blocks, there is only 14.8 GB
  1125. which is compressed down to 7.7 GB.
  1126. (It is this 7.7 GB which is stored via the Tarsnap service and must
  1127. thus be paid for.)
  1128. The newly created archive is 808 MB in size (compressible to 289 MB), but
  1129. only 17.8 MB of the data is new, and after compression only 5.6 MB is
  1130. uploaded to the Tarsnap server.
  1131. .PP
  1132. When
  1133. \fB\%tarsnap\fP
  1134. \fB\--print-stats\fP
  1135. is executed as a command, the table is printed to the standard output;
  1136. when the
  1137. \fB\--print-stats\fP
  1138. option is used while creating or deleting archives, the table is printed
  1139. to the standard error device.
  1140. .PP
  1141. Global statistics are calculated based on the current cache directory, without
  1142. using the keyfile or querying the Tarsnap servers.
  1143. .SH INTERRUPTING ARCHIVAL
  1144. .ad l
  1145. Upon receipt of the
  1146. .BR SIGQUIT
  1147. signal or \&^Q,
  1148. or if the bandwidth limit specified via a
  1149. \fB\--maxbw\fP
  1150. option is reached,
  1151. \fB\%tarsnap\fP
  1152. will interrupt the creation of an archive and truncate it
  1153. at the current position.
  1154. When an archive is truncated, it will be named according to
  1155. the user-specified name plus ".part" to denote the fact that
  1156. it is incomplete.
  1157. Such a truncated archive may be useful in its own right, but
  1158. also offers the benefit that future attempts to archive the
  1159. same data will be faster and use less bandwidth.
  1160. .SH FIREWALLS
  1161. .ad l
  1162. \fB\%tarsnap\fP
  1163. communicates with the
  1164. \fB\%tarsnap\fP
  1165. server via a TCP connection to port 9279; in some environments
  1166. it may be necessary to add a firewall rule to allow outgoing
  1167. TCP connections to this port.
  1168. At the present time (July 2009) there is only one IP address in
  1169. use for the
  1170. \fB\%tarsnap\fP
  1171. server, so network administrators may wish to hard-code that IP
  1172. address; however, it is likely that at some point in the future
  1173. that IP address will change and/or other IP addresses will be
  1174. added.
  1175. .SH ENVIRONMENT
  1176. .ad l
  1177. The following environment variables affect the execution of
  1178. \fB\%tarsnap\fP:
  1179. .RS 5
  1180. .TP
  1181. .B LANG
  1182. The locale to use.
  1183. See
  1184. \fBenviron\fP(7)
  1185. for more information.
  1186. .TP
  1187. .B TZ
  1188. The timezone to use when displaying dates.
  1189. See
  1190. \fBenviron\fP(7)
  1191. for more information.
  1192. .RE
  1193. .SH FILES
  1194. .ad l
  1195. .RS 5
  1196. .TP
  1197. .B @sysconfdir@/tarsnap.conf
  1198. The system global
  1199. \fB\%tarsnap\fP
  1200. configuration file.
  1201. Parameters specified here only take effect if they are not
  1202. specified via the current user's local configuration file
  1203. or via the command line.
  1204. .TP
  1205. .B $XDG_CONFIG_HOME/tarsnap/tarsnap.conf
  1206. A
  1207. \fB\%tarsnap\fP
  1208. configuration file for the current user.
  1209. If the environment variable
  1210. .IR XDG_CONFIG_HOME
  1211. is empty, the default value of
  1212. \fI~/.config/tarsnap/tarsnap.conf\fP
  1213. will be used.
  1214. Parameters specified here take effect unless they are specified via
  1215. \fI~/.tarsnaprc\fP
  1216. or the command line.
  1217. .TP
  1218. .B ~/.tarsnaprc
  1219. Another location for the
  1220. \fB\%tarsnap\fP
  1221. configuration file for the current user.
  1222. Parameters specified here take effect unless they are
  1223. specified via the command line.
  1224. .RE
  1225. .SH EXIT STATUS
  1226. .ad l
  1227. The \fBtarsnap\fP utility exits 0 on success, and >0 if an error occurs.
  1228. .PP
  1229. An exit code of 2 indicates that an error has occurred and the server-side
  1230. state was modified.
  1231. .SH EXAMPLES
  1232. .ad l
  1233. Register with the server and generate keys:
  1234. .RS 4
  1235. \fB\%tarsnap-keygen\fP \fB\--keyfile\fP \fI/usr/tarsnap.key\fP \fB\--user\fP \fIme@example.com\fP \fB\--machine\fP \fImyserver\fP
  1236. .RE
  1237. .PP
  1238. Perform a backup of
  1239. \fI/usr/home\fP
  1240. and
  1241. \fI/other/stuff/to/backup\fP:
  1242. .RS 4
  1243. \fB\%tarsnap\fP \fB\--keyfile\fP \fI/usr/tarsnap.key\fP \fB\--cachedir\fP \fI/usr/tarsnap-cache\fP \fB\-c\fP \fB\-f\fP \fIbackup-2008-04-24\fP \fI/usr/home\fP \fI/other/stuff/to/backup\fP
  1244. .RE
  1245. .PP
  1246. Perform another backup, a day later;
  1247. this is much faster since tarsnap will avoid
  1248. storing data which was previously stored:
  1249. .RS 4
  1250. \fB\%tarsnap\fP \fB\--keyfile\fP \fI/usr/tarsnap.key\fP \fB\--cachedir\fP \fI/usr/tarsnap-cache\fP \fB\-c\fP \fB\-f\fP \fIbackup-2008-04-25\fP \fI/usr/home\fP \fI/other/stuff/to/backup\fP
  1251. .RE
  1252. .PP
  1253. List the archives:
  1254. .RS 4
  1255. \fB\%tarsnap\fP \fB\--keyfile\fP \fI/usr/tarsnap.key\fP \fB\--list-archives\fP
  1256. .RE
  1257. .PP
  1258. Delete the first backup, leaving the second backup intact:
  1259. .RS 4
  1260. \fB\%tarsnap\fP \fB\--keyfile\fP \fI/usr/tarsnap.key\fP \fB\--cachedir\fP \fI/usr/tarsnap-cache\fP \fB\-d\fP \fB\-f\fP \fIbackup-2008-04-24\fP
  1261. .RE
  1262. .PP
  1263. List the files in the remaining backup:
  1264. .RS 4
  1265. \fB\%tarsnap\fP \fB\--keyfile\fP \fI/usr/tarsnap.key\fP \fB\-tv\fP \fB\-f\fP \fIbackup-2008-04-25\fP
  1266. .RE
  1267. .PP
  1268. Restore two users' home directories from the backup:
  1269. .RS 4
  1270. \fB\%tarsnap\fP \fB\--keyfile\fP \fI/usr/tarsnap.key\fP \fB\-x\fP \fB\-f\fP \fIbackup-2008-04-25\fP \fIusr/home/auser\fP \fIusr/home/anotheruser\fP
  1271. .RE
  1272. .PP
  1273. In
  1274. \fI/etc/crontab\fP
  1275. to create a backup of the entire system at 10:32 each day:
  1276. .RS 4
  1277. 32 10 * * * root \fB\%tarsnap\fP \fB\--keyfile\fP \fI/usr/tarsnap.key\fP \fB\--cachedir\fP \fI/usr/tarsnap-cache\fP \fB\-c\fP \fB\-f\fP \fIbackup-`date\fP +\e%Y\e%m\e%d` \fI/\fP
  1278. .RE
  1279. .PP
  1280. Note that the
  1281. \fB\--keyfile\fP
  1282. and
  1283. \fB\--cachedir\fP
  1284. options can be specified via the
  1285. \fBtarsnap.conf\fP(5)
  1286. configuration file, in which case they may be omitted
  1287. from the command line.
  1288. .SH SECURITY
  1289. .ad l
  1290. Certain security issues are common to many archiving programs, including
  1291. \fB\%tarsnap\fP.
  1292. In particular, carefully-crafted archives can request that
  1293. \fB\%tarsnap\fP
  1294. extract files to locations outside of the target directory.
  1295. This can potentially be used to cause unwitting users to overwrite
  1296. files they did not intend to overwrite.
  1297. If the archive is being extracted by the superuser, any file
  1298. on the system can potentially be overwritten.
  1299. There are three ways this can happen.
  1300. Although
  1301. \fB\%tarsnap\fP
  1302. has mechanisms to protect against each one,
  1303. savvy users should be aware of the implications:
  1304. .RS 5
  1305. .IP \(bu
  1306. Archive entries can have absolute pathnames.
  1307. By default,
  1308. \fB\%tarsnap\fP
  1309. removes the leading
  1310. \fI/\fP
  1311. character from filenames before restoring them to guard against this problem.
  1312. .IP \(bu
  1313. Archive entries can have pathnames that include
  1314. \fI\& ..\fP
  1315. components.
  1316. By default,
  1317. \fB\%tarsnap\fP
  1318. will not extract files containing
  1319. \fI\& ..\fP
  1320. components in their pathname.
  1321. .IP \(bu
  1322. Archive entries can exploit symbolic links to restore
  1323. files to other directories.
  1324. An archive can restore a symbolic link to another directory,
  1325. then use that link to restore a file into that directory.
  1326. To guard against this,
  1327. \fB\%tarsnap\fP
  1328. checks each extracted path for symlinks.
  1329. If the final path element is a symlink, it will be removed
  1330. and replaced with the archive entry.
  1331. If
  1332. \fB\-U\fP
  1333. is specified, any intermediate symlink will also be unconditionally removed.
  1334. If neither
  1335. \fB\-U\fP
  1336. nor
  1337. \fB\-P\fP
  1338. is specified,
  1339. \fB\%tarsnap\fP
  1340. will refuse to extract the entry.
  1341. .RE
  1342. .PP
  1343. Although
  1344. \fB\%tarsnap\fP
  1345. cryptographically signs archives in such a manner that it is believed
  1346. to be unfeasible for an attacker to forge an archive without having
  1347. possession of
  1348. \fIkey-file\fP,
  1349. you may wish to examine the contents of archive(s) with
  1350. .RS 4
  1351. \fB\%tarsnap\fP \fB\-t\fP \fB\--keyfile\fP \fIkey-file\fP \fB\-f\fP \fIarchive-name\fP
  1352. .RE
  1353. before extraction.
  1354. Note that the
  1355. \fB\-P\fP
  1356. option to
  1357. \fB\%tarsnap\fP
  1358. disables the security checks above and allows you to extract
  1359. an archive while preserving any absolute pathnames,
  1360. \fI\& ..\fP
  1361. components, or symlinks to other directories.
  1362. .SH SEE ALSO
  1363. .ad l
  1364. \fBtarsnap-keygen\fP(1),
  1365. \fBtar\fP(5),
  1366. \fBtarsnap.conf\fP(5)
  1367. .SH HISTORY
  1368. .ad l
  1369. A
  1370. \fB\%tar\fP
  1371. command appeared in Seventh Edition Unix, which was
  1372. released in January, 1979.
  1373. There have been numerous other implementations,
  1374. many of which extended the file format.
  1375. John Gilmore's
  1376. \fB\%pdtar\fP
  1377. public-domain implementation (circa November, 1987)
  1378. was quite influential, and formed the basis of GNU tar.
  1379. GNU tar was included as the standard system tar
  1380. in
  1381. FreeBSD
  1382. beginning with
  1383. FreeBSD 1.0,
  1384. but was replaced by Tim Kientzle's
  1385. \fB\%bsdtar\fP
  1386. utility and
  1387. \fBlibarchive\fP(3)
  1388. library in
  1389. FreeBSD 5.3.
  1390. .PP
  1391. \fB\%tarsnap\fP
  1392. is built around
  1393. \fB\%bsdtar\fP
  1394. and
  1395. \fBlibarchive\fP(3).
  1396. .SH BUGS
  1397. .ad l
  1398. This program follows
  1399. ISO/IEC 9945-1:1996 (``POSIX.1'')
  1400. for the definition of the
  1401. \fB\-l\fP
  1402. option to
  1403. \fBtar\fP(5).
  1404. Note that GNU tar prior to version 1.15 treated
  1405. \fB\-l\fP
  1406. as a synonym for the
  1407. \fB\--one-file-system\fP
  1408. option.
  1409. .PP
  1410. To archive a file called
  1411. \fI@foo\fP,
  1412. \fI@@foo\fP,
  1413. or
  1414. \fI-foo\fP
  1415. you must specify it as
  1416. \fI\& ./@foo\fP,
  1417. \fI\& ./@@foo\fP,
  1418. or
  1419. \fI\& ./-foo\fP,
  1420. respectively.
  1421. .PP
  1422. In create mode, a leading
  1423. \fI\& ./\fP
  1424. is always removed.
  1425. A leading
  1426. \fI/\fP
  1427. is stripped unless the
  1428. \fB\-P\fP
  1429. option is specified.
  1430. .PP
  1431. Hard link information may be lost if an archive file which is included via the
  1432. \fB@\fP\fIarchive-file\fP
  1433. option is in a non-"tar" format.
  1434. (This is a consequence of the incompatible ways that different archive
  1435. formats store hardlink information.)
  1436. .PP
  1437. There are alternative long options for many of the short options that
  1438. are deliberately not documented.
  1439. .PP
  1440. The limit specified by a
  1441. \fB\--maxbw\fP
  1442. option is not strictly enforced;
  1443. in particular, due to the need to cleanly terminate an archive, the
  1444. amount of bandwidth used may slightly exceed the limit.
  1445. .PP
  1446. If
  1447. \fB\%tarsnap\fP
  1448. is run with standard input, standard output, and standard error
  1449. redirected and inside a chroot where terminal devices are not
  1450. exposed, \&^Q will not be mapped to SIGQUIT and will consequently not
  1451. trigger the truncation of the current archive.