tarsnap.1-mdoc.in 38 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313
  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-noatime
  605. Ignore any
  606. .Cm noatime
  607. option specified in a configuration file.
  608. .It Fl -no-nodump
  609. Ignore any
  610. .Cm nodump
  611. option specified in a configuration file.
  612. .It Fl -no-print-stats
  613. Ignore any
  614. .Cm print-stats
  615. option specified in a configuration file.
  616. .It Fl -no-progress-bytes
  617. Ignore any
  618. .Cm progress-bytes
  619. option specified in a configuration file.
  620. .It Fl -no-quiet
  621. Ignore any
  622. .Cm quiet
  623. option specified in a configuration file.
  624. .It Fl -no-retry-forever
  625. Ignore any
  626. .Cm retry-forever
  627. option specified in a configuration file.
  628. .It Fl -no-snaptime
  629. Ignore any
  630. .Cm snaptime
  631. option specified in a configuration file.
  632. .It Fl -no-store-atime
  633. Ignore any
  634. .Cm store-atime
  635. option specified in a configuration file.
  636. .It Fl -no-totals
  637. Ignore any
  638. .Cm totals
  639. option specified in a configuration file.
  640. .It Fl -noatime
  641. (c mode only)
  642. Ask the operating system to not update the atime when reading files or
  643. directories. Not supported by all operating systems and filesystems.
  644. .It Fl -nodump
  645. (c mode only)
  646. Honor the nodump file flag by skipping this file or directory.
  647. .It Fl -noisy-warnings
  648. Be verbose when warning about network glitches.
  649. This is probably only useful for debugging purposes.
  650. .It Fl -normalmem
  651. Ignore any
  652. .Cm lowmem
  653. or
  654. .Cm verylowmem
  655. option specified in a configuration file.
  656. .It Fl -null
  657. (use with
  658. .Fl I ,
  659. .Fl T ,
  660. or
  661. .Fl X )
  662. Synonym for
  663. .Fl -null-input .
  664. Kept for historical reasons and compatibility with other tar utilities.
  665. .It Fl -null-input
  666. (use with
  667. .Fl I ,
  668. .Fl T ,
  669. or
  670. .Fl X )
  671. Filenames, archive names, and patterns are separated by null characters,
  672. not by newlines.
  673. This is often used to read filenames output by the
  674. .Fl print0
  675. option to
  676. .Xr find 1 .
  677. .It Fl -null-output
  678. (x, t, and list-archives modes only)
  679. Archive names and filenames in output are separated by null characters, not by
  680. newlines.
  681. .Pp
  682. If there are multiple fields on a line, they will be separated by two null
  683. characters.
  684. If a command line is printed within one of those fields, each argument will be
  685. separated by three null characters.
  686. .It Fl -numeric-owner
  687. (x mode only)
  688. Ignore symbolic user and group names when restoring archives to disk,
  689. only numeric uid and gid values will be obeyed.
  690. .It Fl O
  691. (x and t modes only)
  692. In extract (-x) mode, files will be written to standard out rather than
  693. being extracted to disk.
  694. In list (-t) mode, the file listing will be written to stderr rather than
  695. the usual stdout.
  696. .It Fl o
  697. (x mode only)
  698. Use the user and group of the user running the program rather
  699. than those specified in the archive.
  700. Note that this has no significance unless
  701. .Fl p
  702. is specified, and the program is being run by the root user.
  703. In this case, the file modes and flags from
  704. the archive will be restored, but ACLs or owner information in
  705. the archive will be discarded.
  706. .It Fl -one-file-system
  707. (c mode only)
  708. Do not cross mount points.
  709. .It Fl P
  710. (c, x, and t modes only)
  711. Preserve pathnames.
  712. By default, absolute pathnames (those that begin with a /
  713. character) have the leading slash removed both when creating archives
  714. and extracting from them.
  715. Also,
  716. .Nm
  717. will refuse to extract archive entries whose pathnames contain
  718. .Pa ..
  719. or whose target directory would be altered by a symlink.
  720. This option suppresses these behaviors.
  721. .It Fl p
  722. (x mode only)
  723. Preserve file permissions.
  724. Attempt to restore the full permissions, including owner, file modes, file
  725. flags and ACLs, if available, for each item extracted from the archive.
  726. By default, newly-created files are owned by the user running
  727. .Nm ,
  728. the file mode is restored for newly-created regular files, and
  729. all other types of entries receive default permissions.
  730. If
  731. .Nm
  732. is being run by root, the default is to restore the owner unless the
  733. .Fl o
  734. option is also specified.
  735. .It Fl -passphrase Ar method:arg
  736. Read the passphrase using the specified method.
  737. .Bl -tag -width aa
  738. .It Ar dev:tty-stdin
  739. Attempt to read the passphrase from /dev/tty; if that fails, read it from stdin.
  740. This is the default behaviour.
  741. .It Ar dev:stdin-once
  742. Attempt to read the passphrase from stdin, and do so only once even when
  743. encrypting.
  744. This cannot be used if
  745. .Ar infile
  746. is also stdin (aka '-').
  747. .It Ar dev:tty-once
  748. Attempt to read the passphrase from /dev/tty, and do so only once
  749. even when encrypting.
  750. .It Ar env:VAR
  751. Read the passphrase from the environment variable specified by
  752. .Ar VAR .
  753. .Pp
  754. .Bf Em
  755. Storing a passphrase in an environment variable may be a security risk.
  756. .Ef
  757. Only use this option if you are certain that you know what you are doing.
  758. .It Ar file:FILENAME
  759. Read the passphrase from the file specified by
  760. .Ar FILENAME .
  761. .Pp
  762. .Bf Em
  763. Storing a passphrase in a file may be a security risk.
  764. .Ef
  765. Only use this option if you are certain that you know what you are doing.
  766. .El
  767. .It Fl -print-stats
  768. (c and d modes only)
  769. Print statistics for the archive being created (c mode) or delete (d mode).
  770. See "PRINTING ARCHIVE STATISTICS" below for information on the output format.
  771. .It Fl -progress-bytes Ar X
  772. Display a progress message (as if generated from SIGUSR1 or SIGINFO) after
  773. processing each
  774. .Ar X
  775. bytes.
  776. Occurs at most once per file.
  777. .It Fl q ( Fl -fast-read )
  778. (x and t modes only)
  779. Extract or list only the first archive entry that matches each pattern
  780. or filename operand.
  781. Exit as soon as each specified pattern or filename has been matched.
  782. By default, the archive is always read to the very end, since
  783. there can be multiple entries with the same name and, by convention,
  784. later entries overwrite earlier entries.
  785. This option is provided as a performance optimization.
  786. .It Fl -quiet
  787. Avoid printing some warnings.
  788. Currently the warnings which are silenced by this option are
  789. "Removing leading '/' ...",
  790. "Not adding cache directory to archive",
  791. "... file may have grown while being archived",
  792. and
  793. "Skipping entry on filesystem of type ...",
  794. but it is likely that other
  795. warnings will be silenced by this option in future versions of
  796. .Nm .
  797. .It Fl -resume-extract
  798. (x mode only)
  799. Don't extract files whose filesize and mtime matches existing files on the
  800. disk.
  801. Primarily used to resume an archive extraction which was interrupted.
  802. The mtime comparison ignores sub-second timestamp precision, as this is not
  803. supported on all filesystems.
  804. This differs from
  805. .Fl k
  806. in that
  807. .Fl -resume-extract
  808. will overwrite a file if the size or modification time do not match, as can
  809. happen if tarsnap is killed partway through extracting a file.
  810. .It Fl -retry-forever
  811. This option causes tarsnap to continue trying to reconnect to the
  812. tarsnap server forever, instead of giving up after 5-10 minutes.
  813. This may be useful for people with excessively flaky networks, or
  814. on mobile devices which regularly lose their internet connections
  815. for extended periods of time.
  816. This is not enabled by default since continued failures generally indicate a
  817. problem which should be investigated by the user.
  818. .It Fl S
  819. (x mode only)
  820. Extract files as sparse files.
  821. For every block on disk, check first if it contains any non-NULL bytes and seek
  822. over it otherwise.
  823. This works similar to the conv=sparse option of dd.
  824. .It Fl s Ar pattern
  825. Modify file or archive member names according to
  826. .Pa pattern .
  827. The pattern has the format /old/new/[gps].
  828. old is a basic regular expression.
  829. If it doesn't apply, the pattern is skipped.
  830. new is the replacement string of the matched part.
  831. ~ is substituted with the match, \e1 to \e9 with the contents of
  832. the corresponding captured group.
  833. The optional trailing g specifies that matching should continue
  834. after the matched part and stop on the first unmatched pattern.
  835. The optional trailing s specifies that the pattern applies to the value
  836. of symbolic links.
  837. The optional trailing p specifies that after a successful substitution
  838. the original path name and the new path name should be printed to
  839. standard error.
  840. .It Fl -snaptime Pa filename
  841. (c mode only)
  842. This option MUST be specified when creating a backup from a filesystem
  843. snapshot, and
  844. .Pa filename
  845. must have a modification time prior to when the filesystem snapshot was
  846. created.
  847. (This is necessary to prevent races between file modification and snapshot
  848. creation which could result in
  849. .Nm
  850. failing to recognize that a file has been modified.)
  851. .It Fl -store-atime
  852. (c mode only)
  853. Enable the storing of file access times.
  854. The default behaviour of
  855. .Nm
  856. is to not store file access times, since this can cause a significant amount
  857. of bandwidth and storage to be wasted when the same set of files are archived
  858. several times (e.g., if daily backup archives are created) due to
  859. .Nm
  860. itself accessing files and thereby causing their access times to be changed.
  861. .It Fl -strip-components Ar count
  862. (x mode only)
  863. Remove the specified number of leading path elements.
  864. Pathnames with fewer elements will be silently skipped.
  865. Note that the pathname is edited after checking inclusion/exclusion patterns
  866. but before security checks.
  867. .It Fl T Ar filename
  868. (c, x, and t modes only)
  869. In x or t mode,
  870. .Nm
  871. will read the list of names to be extracted from
  872. .Pa filename .
  873. In c mode,
  874. .Nm
  875. will read names to be archived from
  876. .Pa filename .
  877. The special name
  878. .Dq -C
  879. on a line by itself will cause the current directory to be changed to
  880. the directory specified on the following line.
  881. Names are terminated by newlines unless
  882. .Fl -null-input
  883. is specified.
  884. Note that
  885. .Fl -null-input
  886. also disables the special handling of lines containing
  887. .Dq -C .
  888. If
  889. .Pa filename
  890. is
  891. .Dq -
  892. then the list of names will be read from the standard input.
  893. Note: If you are generating lists of files using
  894. .Xr find 1 ,
  895. you probably want to use
  896. .Fl n
  897. as well.
  898. .It Fl -totals
  899. (c mode only)
  900. Print the size of the archive after creating it.
  901. This option is provided mainly for compatibility with GNU tar; in most
  902. situations the
  903. .Fl -print-stats
  904. option will be far more useful.
  905. .It Fl U
  906. (x mode only)
  907. Unlink files before creating them.
  908. Without this option,
  909. .Nm
  910. overwrites existing files, which preserves existing hardlinks.
  911. With this option, existing hardlinks will be broken, as will any
  912. symlink that would affect the location of an extracted file.
  913. .It Fl v
  914. (c, d, t, x, and list-archives modes only)
  915. Produce verbose output.
  916. In create and extract modes,
  917. .Nm
  918. will list each file name as it is read from or written to
  919. the archive.
  920. In delete mode,
  921. .Nm
  922. will list the name of each archive as it is deleted.
  923. In list mode,
  924. .Nm
  925. will produce output similar to that of
  926. .Xr ls 1 .
  927. Additional
  928. .Fl v
  929. options will provide additional detail.
  930. .It Fl -verify-config
  931. Check the configuration file(s) for syntactic errors.
  932. .It Fl -version
  933. Print version number of
  934. .Nm ,
  935. and exit.
  936. .It Fl -verylowmem
  937. (c mode only)
  938. Reduce memory usage, by approximately a factor of 2 beyond
  939. the memory usage when
  940. .Fl -lowmem
  941. is specified, by not caching anything.
  942. .It Fl w
  943. (c and x modes only)
  944. Ask for confirmation for every action.
  945. .It Fl X Ar filename
  946. (c, x, and t modes only)
  947. Read a list of exclusion patterns from the specified file.
  948. See
  949. .Fl -exclude
  950. for more information about the handling of exclusions.
  951. .El
  952. .Sh SIGNALS
  953. .Nm
  954. handles the following signals:
  955. .Bl -tag -width "SIGUSR2"
  956. .It SIGUSR1 & SIGINFO
  957. On receipt of the SIGUSR1 signal or (on platforms where it exists) the
  958. SIGINFO signal,
  959. .Nm
  960. prints the current file or directory being processed, and (for files)
  961. its progress within the file.
  962. It also prints the number of files and the number of uncompressed bytes
  963. processed.
  964. Note that due to network buffering the file position will not align precisely
  965. with how much data has been sent to or received from the
  966. .Nm
  967. server.
  968. .It SIGSTOP & SIGTSTP
  969. On receipt of a SIGSTOP or SIGTSTP signal, the kernel will suspend the
  970. .Nm
  971. process.
  972. Upon receiving a SIGCONT signal,
  973. .Nm
  974. will reconnect to the server (if necessary) and continue the specified task.
  975. .It SIGUSR2
  976. On receipt of the SIGUSR2 signal, if
  977. .Nm
  978. is creating an archive (mode c), it will create a checkpoint at the
  979. current position.
  980. .It SIGQUIT
  981. On receipt of the SIGQUIT signal, if
  982. .Nm
  983. is creating an archive (mode c) it will truncate the archive at the
  984. current position and exit (see "INTERRUPTING ARCHIVAL" below).
  985. .El
  986. .Sh PRINTING ARCHIVE STATISTICS
  987. There are four commands which print statistics about archives:
  988. .Bl -bullet -width indent
  989. .It
  990. Global statistics:
  991. .Dl Nm Fl -print-stats
  992. .It
  993. Global statistics and info about specific archive(s):
  994. .Dl Nm Fl -print-stats Fl f Ar archive-name1 Op Fl f Ar ...
  995. .It
  996. Global statistics and info about all archives:
  997. .Dl Nm Fl -print-stats Fl f Ar '*'
  998. .It
  999. Global statistics and info about the archive(s) that were just created or
  1000. deleted:
  1001. .Dl Nm Fl c Fl -print-stats Fl f Ar archive-name Ar DIR
  1002. .Dl Nm Fl d Fl -print-stats Fl f Ar archive-name1 Op Fl f Ar ...
  1003. .El
  1004. .Pp
  1005. .Nm
  1006. will print a table in the following format:
  1007. .Bd -literal
  1008. Total size Compressed size
  1009. All archives 104491640436 51510524844
  1010. (unique data) 14830618089 7733620463
  1011. This archive 808723344 289077325
  1012. New data 17858641 5658308
  1013. .Ed
  1014. .Pp
  1015. In this example, the combined size of all archives stored by
  1016. .Nm
  1017. using the same keys is 104 GB, and the combined size post-compression
  1018. would be 51 GB; but after removing duplicate blocks, there is only 14.8 GB
  1019. which is compressed down to 7.7 GB.
  1020. (It is this 7.7 GB which is stored via the Tarsnap service and must
  1021. thus be paid for.)
  1022. The newly created archive is 808 MB in size (compressible to 289 MB), but
  1023. only 17.8 MB of the data is new, and after compression only 5.6 MB is
  1024. uploaded to the Tarsnap server.
  1025. .Pp
  1026. When
  1027. .Nm
  1028. .Fl -print-stats
  1029. is executed as a command, the table is printed to the standard output;
  1030. when the
  1031. .Fl -print-stats
  1032. option is used while creating or deleting archives, the table is printed
  1033. to the standard error device.
  1034. .Pp
  1035. Global statistics are calculated based on the current cache directory, without
  1036. using the keyfile or querying the Tarsnap servers.
  1037. .Sh INTERRUPTING ARCHIVAL
  1038. Upon receipt of the
  1039. .Dv SIGQUIT
  1040. signal or \&^Q,
  1041. or if the bandwidth limit specified via a
  1042. .Fl -maxbw
  1043. option is reached,
  1044. .Nm
  1045. will interrupt the creation of an archive and truncate it
  1046. at the current position.
  1047. When an archive is truncated, it will be named according to
  1048. the user-specified name plus ".part" to denote the fact that
  1049. it is incomplete.
  1050. Such a truncated archive may be useful in its own right, but
  1051. also offers the benefit that future attempts to archive the
  1052. same data will be faster and use less bandwidth.
  1053. .Sh FIREWALLS
  1054. .Nm
  1055. communicates with the
  1056. .Nm
  1057. server via a TCP connection to port 9279; in some environments
  1058. it may be necessary to add a firewall rule to allow outgoing
  1059. TCP connections to this port.
  1060. At the present time (July 2009) there is only one IP address in
  1061. use for the
  1062. .Nm
  1063. server, so network administrators may wish to hard-code that IP
  1064. address; however, it is likely that at some point in the future
  1065. that IP address will change and/or other IP addresses will be
  1066. added.
  1067. .Sh ENVIRONMENT
  1068. The following environment variables affect the execution of
  1069. .Nm :
  1070. .Bl -tag -width ".Ev BLOCKSIZE"
  1071. .It Ev LANG
  1072. The locale to use.
  1073. See
  1074. .Xr environ 7
  1075. for more information.
  1076. .It Ev TZ
  1077. The timezone to use when displaying dates.
  1078. See
  1079. .Xr environ 7
  1080. for more information.
  1081. .El
  1082. .Sh FILES
  1083. .Bl -tag -width indent
  1084. .It Pa @sysconfdir@/tarsnap.conf
  1085. The system global
  1086. .Nm
  1087. configuration file.
  1088. Parameters specified here only take effect if they are not
  1089. specified via the current user's local configuration file
  1090. or via the command line.
  1091. .It Pa $XDG_CONFIG_HOME/tarsnap/tarsnap.conf
  1092. A
  1093. .Nm
  1094. configuration file for the current user.
  1095. If the environment variable
  1096. .Ev XDG_CONFIG_HOME
  1097. is empty, the default value of
  1098. .Pa ~/.config/tarsnap/tarsnap.conf
  1099. will be used.
  1100. Parameters specified here take effect unless they are specified via
  1101. .Pa ~/.tarsnaprc
  1102. or the command line.
  1103. .It Pa ~/.tarsnaprc
  1104. Another location for the
  1105. .Nm
  1106. configuration file for the current user.
  1107. Parameters specified here take effect unless they are
  1108. specified via the command line.
  1109. .El
  1110. .Sh EXIT STATUS
  1111. .Ex -std
  1112. .Pp
  1113. An exit code of 2 indicates that an error has occurred and the server-side
  1114. state was modified.
  1115. .Sh EXAMPLES
  1116. Register with the server and generate keys:
  1117. .Dl Nm tarsnap-keygen Fl -keyfile Pa /usr/tarsnap.key Fl -user Ar me@example.com Fl -machine Ar myserver
  1118. .Pp
  1119. Perform a backup of
  1120. .Pa /usr/home
  1121. and
  1122. .Pa /other/stuff/to/backup :
  1123. .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
  1124. .Pp
  1125. Perform another backup, a day later;
  1126. this is much faster since tarsnap will avoid
  1127. storing data which was previously stored:
  1128. .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
  1129. .Pp
  1130. List the archives:
  1131. .Dl Nm Fl -keyfile Pa /usr/tarsnap.key Fl -list-archives
  1132. .Pp
  1133. Delete the first backup, leaving the second backup intact:
  1134. .Dl Nm Fl -keyfile Pa /usr/tarsnap.key Fl -cachedir Pa /usr/tarsnap-cache Fl d Fl f Ar backup-2008-04-24
  1135. .Pp
  1136. List the files in the remaining backup:
  1137. .Dl Nm Fl -keyfile Pa /usr/tarsnap.key Fl tv Fl f Ar backup-2008-04-25
  1138. .Pp
  1139. Restore two users' home directories from the backup:
  1140. .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
  1141. .Pp
  1142. In
  1143. .Pa /etc/crontab
  1144. to create a backup of the entire system at 10:32 each day:
  1145. .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 /
  1146. .Pp
  1147. Note that the
  1148. .Fl -keyfile
  1149. and
  1150. .Fl -cachedir
  1151. options can be specified via the
  1152. .Xr tarsnap.conf 5
  1153. configuration file, in which case they may be omitted
  1154. from the command line.
  1155. .Sh SECURITY
  1156. Certain security issues are common to many archiving programs, including
  1157. .Nm .
  1158. In particular, carefully-crafted archives can request that
  1159. .Nm
  1160. extract files to locations outside of the target directory.
  1161. This can potentially be used to cause unwitting users to overwrite
  1162. files they did not intend to overwrite.
  1163. If the archive is being extracted by the superuser, any file
  1164. on the system can potentially be overwritten.
  1165. There are three ways this can happen.
  1166. Although
  1167. .Nm
  1168. has mechanisms to protect against each one,
  1169. savvy users should be aware of the implications:
  1170. .Bl -bullet -width indent
  1171. .It
  1172. Archive entries can have absolute pathnames.
  1173. By default,
  1174. .Nm
  1175. removes the leading
  1176. .Pa /
  1177. character from filenames before restoring them to guard against this problem.
  1178. .It
  1179. Archive entries can have pathnames that include
  1180. .Pa ..
  1181. components.
  1182. By default,
  1183. .Nm
  1184. will not extract files containing
  1185. .Pa ..
  1186. components in their pathname.
  1187. .It
  1188. Archive entries can exploit symbolic links to restore
  1189. files to other directories.
  1190. An archive can restore a symbolic link to another directory,
  1191. then use that link to restore a file into that directory.
  1192. To guard against this,
  1193. .Nm
  1194. checks each extracted path for symlinks.
  1195. If the final path element is a symlink, it will be removed
  1196. and replaced with the archive entry.
  1197. If
  1198. .Fl U
  1199. is specified, any intermediate symlink will also be unconditionally removed.
  1200. If neither
  1201. .Fl U
  1202. nor
  1203. .Fl P
  1204. is specified,
  1205. .Nm
  1206. will refuse to extract the entry.
  1207. .El
  1208. .Pp
  1209. Although
  1210. .Nm
  1211. cryptographically signs archives in such a manner that it is believed
  1212. to be unfeasible for an attacker to forge an archive without having
  1213. possession of
  1214. .Ar key-file ,
  1215. you may wish to examine the contents of archive(s) with
  1216. .Dl Nm Fl t Fl -keyfile Ar key-file Fl f Ar archive-name
  1217. before extraction.
  1218. Note that the
  1219. .Fl P
  1220. option to
  1221. .Nm
  1222. disables the security checks above and allows you to extract
  1223. an archive while preserving any absolute pathnames,
  1224. .Pa ..
  1225. components, or symlinks to other directories.
  1226. .Sh SEE ALSO
  1227. .Xr tarsnap-keygen 1 ,
  1228. .Xr tar 5 ,
  1229. .Xr tarsnap.conf 5
  1230. .Sh HISTORY
  1231. A
  1232. .Nm tar
  1233. command appeared in Seventh Edition Unix, which was
  1234. released in January, 1979.
  1235. There have been numerous other implementations,
  1236. many of which extended the file format.
  1237. John Gilmore's
  1238. .Nm pdtar
  1239. public-domain implementation (circa November, 1987)
  1240. was quite influential, and formed the basis of GNU tar.
  1241. GNU tar was included as the standard system tar
  1242. in
  1243. .Fx
  1244. beginning with
  1245. .Fx 1.0 ,
  1246. but was replaced by Tim Kientzle's
  1247. .Nm bsdtar
  1248. utility and
  1249. .Xr libarchive 3
  1250. library in
  1251. .Fx 5.3 .
  1252. .Pp
  1253. .Nm
  1254. is built around
  1255. .Nm bsdtar
  1256. and
  1257. .Xr libarchive 3 .
  1258. .Sh BUGS
  1259. This program follows
  1260. .St -p1003.1-96
  1261. for the definition of the
  1262. .Fl l
  1263. option to
  1264. .Xr tar 5 .
  1265. Note that GNU tar prior to version 1.15 treated
  1266. .Fl l
  1267. as a synonym for the
  1268. .Fl -one-file-system
  1269. option.
  1270. .Pp
  1271. To archive a file called
  1272. .Pa @foo ,
  1273. .Pa @@foo ,
  1274. or
  1275. .Pa -foo
  1276. you must specify it as
  1277. .Pa ./@foo ,
  1278. .Pa ./@@foo ,
  1279. or
  1280. .Pa ./-foo ,
  1281. respectively.
  1282. .Pp
  1283. In create mode, a leading
  1284. .Pa ./
  1285. is always removed.
  1286. A leading
  1287. .Pa /
  1288. is stripped unless the
  1289. .Fl P
  1290. option is specified.
  1291. .Pp
  1292. Hard link information may be lost if an archive file which is included via the
  1293. .Cm @ Ns Pa archive-file
  1294. option is in a non-"tar" format.
  1295. (This is a consequence of the incompatible ways that different archive
  1296. formats store hardlink information.)
  1297. .Pp
  1298. There are alternative long options for many of the short options that
  1299. are deliberately not documented.
  1300. .Pp
  1301. The limit specified by a
  1302. .Fl -maxbw
  1303. option is not strictly enforced;
  1304. in particular, due to the need to cleanly terminate an archive, the
  1305. amount of bandwidth used may slightly exceed the limit.
  1306. .Pp
  1307. If
  1308. .Nm
  1309. is run with standard input, standard output, and standard error
  1310. redirected and inside a chroot where terminal devices are not
  1311. exposed, \&^Q will not be mapped to SIGQUIT and will consequently not
  1312. trigger the truncation of the current archive.