borg-extract.1 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .TH BORG-EXTRACT 1 "2017-11-25" "" "borg backup tool"
  4. .SH NAME
  5. borg-extract \- Extract archive contents
  6. .
  7. .nr rst2man-indent-level 0
  8. .
  9. .de1 rstReportMargin
  10. \\$1 \\n[an-margin]
  11. level \\n[rst2man-indent-level]
  12. level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
  13. -
  14. \\n[rst2man-indent0]
  15. \\n[rst2man-indent1]
  16. \\n[rst2man-indent2]
  17. ..
  18. .de1 INDENT
  19. .\" .rstReportMargin pre:
  20. . RS \\$1
  21. . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
  22. . nr rst2man-indent-level +1
  23. .\" .rstReportMargin post:
  24. ..
  25. .de UNINDENT
  26. . RE
  27. .\" indent \\n[an-margin]
  28. .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
  29. .nr rst2man-indent-level -1
  30. .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
  31. .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
  32. ..
  33. .SH SYNOPSIS
  34. .sp
  35. borg [common options] extract [options] ARCHIVE [PATH...]
  36. .SH DESCRIPTION
  37. .sp
  38. This command extracts the contents of an archive. By default the entire
  39. archive is extracted but a subset of files and directories can be selected
  40. by passing a list of \fBPATHs\fP as arguments. The file selection can further
  41. be restricted by using the \fB\-\-exclude\fP option.
  42. .sp
  43. See the output of the "borg help patterns" command for more help on exclude patterns.
  44. .sp
  45. By using \fB\-\-dry\-run\fP, you can do all extraction steps except actually writing the
  46. output data: reading metadata and data chunks from the repo, checking the hash/hmac,
  47. decrypting, decompressing.
  48. .sp
  49. \fB\-\-progress\fP can be slower than no progress display, since it makes one additional
  50. pass over the archive metadata.
  51. .sp
  52. \fBNOTE:\fP
  53. .INDENT 0.0
  54. .INDENT 3.5
  55. Currently, extract always writes into the current working directory ("."),
  56. so make sure you \fBcd\fP to the right place before calling \fBborg extract\fP\&.
  57. .UNINDENT
  58. .UNINDENT
  59. .SH OPTIONS
  60. .sp
  61. See \fIborg\-common(1)\fP for common options of Borg commands.
  62. .SS arguments
  63. .INDENT 0.0
  64. .TP
  65. .B ARCHIVE
  66. archive to extract
  67. .TP
  68. .B PATH
  69. paths to extract; patterns are supported
  70. .UNINDENT
  71. .SS optional arguments
  72. .INDENT 0.0
  73. .TP
  74. .B \-\-list
  75. output verbose list of items (files, dirs, ...)
  76. .TP
  77. .B \-n\fP,\fB \-\-dry\-run
  78. do not actually change any files
  79. .TP
  80. .B \-\-numeric\-owner
  81. only obey numeric user and group identifiers
  82. .TP
  83. .B \-\-nobsdflags
  84. do not extract/set bsdflags (e.g. NODUMP, IMMUTABLE)
  85. .TP
  86. .B \-\-stdout
  87. write all extracted data to stdout
  88. .TP
  89. .B \-\-sparse
  90. create holes in output sparse file from all\-zero chunks
  91. .UNINDENT
  92. .SS Exclusion options
  93. .INDENT 0.0
  94. .TP
  95. .BI \-e \ PATTERN\fP,\fB \ \-\-exclude \ PATTERN
  96. exclude paths matching PATTERN
  97. .TP
  98. .BI \-\-exclude\-from \ EXCLUDEFILE
  99. read exclude patterns from EXCLUDEFILE, one per line
  100. .TP
  101. .BI \-\-pattern \ PATTERN
  102. experimental: include/exclude paths matching PATTERN
  103. .TP
  104. .BI \-\-patterns\-from \ PATTERNFILE
  105. experimental: read include/exclude patterns from PATTERNFILE, one per line
  106. .TP
  107. .BI \-\-strip\-components \ NUMBER
  108. Remove the specified number of leading path elements. Paths with fewer elements will be silently skipped.
  109. .UNINDENT
  110. .SH EXAMPLES
  111. .INDENT 0.0
  112. .INDENT 3.5
  113. .sp
  114. .nf
  115. .ft C
  116. # Extract entire archive
  117. $ borg extract /path/to/repo::my\-files
  118. # Extract entire archive and list files while processing
  119. $ borg extract \-\-list /path/to/repo::my\-files
  120. # Verify whether an archive could be successfully extracted, but do not write files to disk
  121. $ borg extract \-\-dry\-run /path/to/repo::my\-files
  122. # Extract the "src" directory
  123. $ borg extract /path/to/repo::my\-files home/USERNAME/src
  124. # Extract the "src" directory but exclude object files
  125. $ borg extract /path/to/repo::my\-files home/USERNAME/src \-\-exclude \(aq*.o\(aq
  126. # Restore a raw device (must not be active/in use/mounted at that time)
  127. $ borg extract \-\-stdout /path/to/repo::my\-sdx | dd of=/dev/sdx bs=10M
  128. .ft P
  129. .fi
  130. .UNINDENT
  131. .UNINDENT
  132. .SH SEE ALSO
  133. .sp
  134. \fIborg\-common(1)\fP, \fIborg\-mount(1)\fP
  135. .SH AUTHOR
  136. The Borg Collective
  137. .\" Generated by docutils manpage writer.
  138. .