create.rst.inc 5.3 KB

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