borg-extract.1 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .TH BORG-EXTRACT 1 "2017-03-26" "" "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 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. .SH OPTIONS
  49. .sp
  50. See \fIborg\-common(1)\fP for common options of Borg commands.
  51. .SS arguments
  52. .INDENT 0.0
  53. .TP
  54. .B ARCHIVE
  55. archive to extract
  56. .TP
  57. .B PATH
  58. paths to extract; patterns are supported
  59. .UNINDENT
  60. .SS optional arguments
  61. .INDENT 0.0
  62. .TP
  63. .B \-p\fP,\fB \-\-progress
  64. show progress while extracting (may be slower)
  65. .TP
  66. .B \-\-list
  67. output verbose list of items (files, dirs, ...)
  68. .TP
  69. .B \-n\fP,\fB \-\-dry\-run
  70. do not actually change any files
  71. .TP
  72. .BI \-e \ PATTERN\fP,\fB \ \-\-exclude \ PATTERN
  73. exclude paths matching PATTERN
  74. .TP
  75. .BI \-\-exclude\-from \ EXCLUDEFILE
  76. read exclude patterns from EXCLUDEFILE, one per line
  77. .TP
  78. .BI \-\-pattern \ PATTERN
  79. include/exclude paths matching PATTERN
  80. .TP
  81. .BI \-\-patterns\-from \ PATTERNFILE
  82. read include/exclude patterns from PATTERNFILE, one per line
  83. .TP
  84. .B \-\-numeric\-owner
  85. only obey numeric user and group identifiers
  86. .TP
  87. .BI \-\-strip\-components \ NUMBER
  88. Remove the specified number of leading path elements. Pathnames with fewer elements will be silently skipped.
  89. .TP
  90. .B \-\-stdout
  91. write all extracted data to stdout
  92. .TP
  93. .B \-\-sparse
  94. create holes in output sparse file from all\-zero chunks
  95. .UNINDENT
  96. .SH EXAMPLES
  97. .INDENT 0.0
  98. .INDENT 3.5
  99. .sp
  100. .nf
  101. .ft C
  102. # Extract entire archive
  103. $ borg extract /path/to/repo::my\-files
  104. # Extract entire archive and list files while processing
  105. $ borg extract \-\-list /path/to/repo::my\-files
  106. # Verify whether an archive could be successfully extracted, but do not write files to disk
  107. $ borg extract \-\-dry\-run /path/to/repo::my\-files
  108. # Extract the "src" directory
  109. $ borg extract /path/to/repo::my\-files home/USERNAME/src
  110. # Extract the "src" directory but exclude object files
  111. $ borg extract /path/to/repo::my\-files home/USERNAME/src \-\-exclude \(aq*.o\(aq
  112. # Restore a raw device (must not be active/in use/mounted at that time)
  113. $ borg extract \-\-stdout /path/to/repo::my\-sdx | dd of=/dev/sdx bs=10M
  114. .ft P
  115. .fi
  116. .UNINDENT
  117. .UNINDENT
  118. .sp
  119. \fBNOTE:\fP
  120. .INDENT 0.0
  121. .INDENT 3.5
  122. Currently, extract always writes into the current working directory ("."),
  123. so make sure you \fBcd\fP to the right place before calling \fBborg extract\fP\&.
  124. .UNINDENT
  125. .UNINDENT
  126. .SH SEE ALSO
  127. .sp
  128. \fIborg\-common(1)\fP, \fIborg\-mount(1)\fP
  129. .SH AUTHOR
  130. The Borg Collective
  131. .\" Generated by docutils manpage writer.
  132. .