tarsnap.1-mdoc.in 38 KB

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