create.rst.inc 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. .. IMPORTANT: this file is auto-generated from borg's built-in help, do not edit!
  2. .. _borg_create:
  3. borg create
  4. -----------
  5. ::
  6. usage: borg create [-h] [--critical] [--error] [--warning] [--info] [--debug]
  7. [--lock-wait N] [--show-rc] [--no-files-cache] [--umask M]
  8. [--remote-path PATH] [-s] [-p] [--list]
  9. [--filter STATUSCHARS] [-e PATTERN]
  10. [--exclude-from EXCLUDEFILE] [--exclude-caches]
  11. [--exclude-if-present FILENAME] [--keep-tag-files]
  12. [-c SECONDS] [-x] [--numeric-owner] [--noatime] [--noctime]
  13. [--timestamp yyyy-mm-ddThh:mm:ss]
  14. [--chunker-params CHUNK_MIN_EXP,CHUNK_MAX_EXP,HASH_MASK_BITS,HASH_WINDOW_SIZE]
  15. [--ignore-inode] [-C COMPRESSION] [--read-special] [-n]
  16. ARCHIVE PATH [PATH ...]
  17. Create new archive
  18. positional arguments:
  19. ARCHIVE name of archive to create (must be also a valid
  20. directory name)
  21. PATH paths to archive
  22. optional arguments:
  23. -h, --help show this help message and exit
  24. --critical work on log level CRITICAL
  25. --error work on log level ERROR
  26. --warning work on log level WARNING (default)
  27. --info, -v, --verbose
  28. work on log level INFO
  29. --debug work on log level DEBUG
  30. --lock-wait N wait for the lock, but max. N seconds (default: 1).
  31. --show-rc show/log the return code (rc)
  32. --no-files-cache do not load/update the file metadata cache used to
  33. detect unchanged files
  34. --umask M set umask to M (local and remote, default: 0077)
  35. --remote-path PATH use PATH as borg executable on the remote (default:
  36. "borg")
  37. -s, --stats print statistics for the created archive. Requires
  38. -v/--verbose.
  39. -p, --progress show progress display while creating the archive,
  40. showing Original, Compressed and Deduplicated sizes,
  41. followed by the Number of files seen and the path
  42. being processed, default: False
  43. --list output verbose list of items (files, dirs, ...).
  44. Requires -v/--verbose.
  45. --filter STATUSCHARS only display items with the given status characters
  46. -e PATTERN, --exclude PATTERN
  47. exclude paths matching PATTERN
  48. --exclude-from EXCLUDEFILE
  49. read exclude patterns from EXCLUDEFILE, one per line
  50. --exclude-caches exclude directories that contain a CACHEDIR.TAG file
  51. (http://www.brynosaurus.com/cachedir/spec.html)
  52. --exclude-if-present FILENAME
  53. exclude directories that contain the specified file
  54. --keep-tag-files keep tag files of excluded caches/directories
  55. -c SECONDS, --checkpoint-interval SECONDS
  56. write checkpoint every SECONDS seconds (Default: 1800)
  57. -x, --one-file-system
  58. stay in same file system
  59. --numeric-owner only store numeric user and group identifiers
  60. --noatime do not store atime into archive
  61. --noctime do not store ctime into archive
  62. --timestamp yyyy-mm-ddThh:mm:ss
  63. manually specify the archive creation date/time (UTC).
  64. alternatively, give a reference file/directory.
  65. --chunker-params CHUNK_MIN_EXP,CHUNK_MAX_EXP,HASH_MASK_BITS,HASH_WINDOW_SIZE
  66. specify the chunker parameters. default: 19,23,21,4095
  67. --ignore-inode ignore inode data in the file metadata cache used to
  68. detect unchanged files.
  69. -C COMPRESSION, --compression COMPRESSION
  70. select compression algorithm (and level): none == no
  71. compression (default), lz4 == lz4, zlib == zlib
  72. (default level 6), zlib,0 .. zlib,9 == zlib (with
  73. level 0..9), lzma == lzma (default level 6), lzma,0 ..
  74. lzma,9 == lzma (with level 0..9).
  75. --read-special open and read block and char device files as well as
  76. FIFOs as if they were regular files. Also follows
  77. symlinks pointing to these kinds of files.
  78. -n, --dry-run do not create a backup archive
  79. Description
  80. ~~~~~~~~~~~
  81. This command creates a backup archive containing all files found while recursively
  82. traversing all paths specified. Paths are added to the archive as they are given,
  83. that means if relative paths are desired, the command has to be run from the correct
  84. directory.
  85. When giving '-' as path, borg will read data from standard input and create a
  86. file 'stdin' in the created archive from that data.
  87. The archive will consume almost no disk space for files or parts of files that
  88. have already been stored in other archives.
  89. The archive name needs to be unique. It must not end in '.checkpoint' or
  90. '.checkpoint.N' (with N being a number), because these names are used for
  91. checkpoints and treated in special ways.
  92. In the archive name, you may use the following placeholders:
  93. {now}, {utcnow}, {fqdn}, {hostname}, {user} and some others.
  94. To speed up pulling backups over sshfs and similar network file systems which do
  95. not provide correct inode information the --ignore-inode flag can be used. This
  96. potentially decreases reliability of change detection, while avoiding always reading
  97. all files on these file systems.
  98. The mount points of filesystems or filesystem snapshots should be the same for every
  99. creation of a new archive to ensure fast operation. This is because the file cache that
  100. is used to determine changed files quickly uses absolute filenames.
  101. If this is not possible, consider creating a bind mount to a stable location.
  102. See the output of the "borg help patterns" command for more help on exclude patterns.
  103. See the output of the "borg help placeholders" command for more help on placeholders.