Skip to main content

create

8BitSafe-cli [common options] archive create [options] [REPO::ARCHIVE] [PATH...]
positional argumentsdescription
REPO::ARCHIVEname of archive to create (must be also a valid directory name)
PATH(S)paths to archive
optional argumentsdescriptiondefaultallowed
-e,--exclude <patterns>exclude pattern(s)paths or glob patterns
--chunker-params <params>MIN_EXP, MAX_EXP, HASH_MASK_BITS, HASH_WINDOW_SIZE19,22,21,4095
-c,--compression <algo,lvl>Compression algolz4supported values
--no-compression-patternsDisable default compression patterns-
--compression-patterns <path>Path to compression patterns file-compression-patterns path
--comment <text>A comment to include in archive-string
--num-thread <num>Number of worker threads-1integer
--ratelimit <limitString>Upload rate limit-limitString
--manifest <path>Write a manifest to the provide path (optional compression)-
--abort-on-missingAbort the backup if an archive path is missing-
--abort-on-sharing-violationAbort the backup if we fail to open a file due to sharing violation-
--abort-on-lock-violationAbort the backup if we fail to open a file due to lock violation-
--no-cacheDo not use/update any caches-
--no-file-cacheDo not use/update file cache-
--no-obj-cacheDo not use/update object cache-
--file-cache-no-expireItems added to the file cache never expire-
--file-cache-ttlHow long items in the file cache are valid10monthsdurationString
--file-cache-jitterDefines the upper bound of random jitter added to ttl12monthsdurationString

Description

This command creates a backup archive containing all files found while recursively traversing all paths specified. Paths are added to the archive as they are given, that means if relative paths are desired, the command has to be run from the correct directory.

tip

Passing individual files as paths is also supported

Archive name

Every archive name in a single repository must be unique and a valid directory name.

To help with creating a unique name for each archive we support a number of placeholders for example docs-{user}-{nowutc}.

See placeholders for more details.

note

The name must not end with a space or contain the following prohibited characters: <,>,:,",/,\,|,?,*.

Compression

With the -c,--compression <algo,lvl> option you can set the default compression algorithm, that will be used for files without matching compression patterns.

See here for details about supported compression algorithms and levels.

Examples

info
8BitSafe-cli archive create -c lz4,4 /mnt/tank/backup::docs-{nowutc} /home/jane/docs
8BitSafe-cli archive create -c zstd /mnt/tank/backup::docs-{nowutc} /home/jane/docs
8BitSafe-cli archive create -c zstd,18 /mnt/tank/backup::docs-{nowutc} /home/jane/docs
8BitSafe-cli archive create -c zstd,fast /mnt/tank/backup::docs-{nowutc} /home/jane/docs

Compression patterns file

You can optionally pass a path to a file containing compression patterns. This allows you to disable or change the compression settings for various files using glob patterns.

When you don't pass a custom compression patterns file a default set of patterns is used see compression patterns for details.

You can use --no-compression-patterns to disable the default compression patterns.

Data rate

You can limit the speed at which data is pushed to the repo this works for all store types, even local disk.
This argument takes a human data rate.

Examples

info
8BitSafe-cli --ratelimit 15Mbps archive create /mnt/tank/backup::docs-{nowutc} /home/tom/docs

Manifest

For each archive created you can write a manifest file which contains a full list of archived in json format.
These manifest files can be useful for automation or manually inspecting the contents of an archive.

The --manifest option takes a path that can be a directory and the file name is automatically generated including the current timestamp, or it can be a full path which supports the same placeholders as archive name (see above).

Examples

info

Directory only (file name is auto generated):

8BitSafe-cli archive create --manifest /mnt/backups/manifests/ /mnt/backups/repo::{user}-{nowutc} /home/

Full path (file is overwritten each time):

8BitSafe-cli archive create --manifest /mnt/backups/manifests/fixed_name.json /mnt/backups/repo::{user}-{nowutc} /home/

Full path using placeholders:

8BitSafe-cli archive create --manifest /mnt/backups/manifests/manifest_{user}-{nowutc}.json /mnt/backups/repo::{user}-{nowutc} /home/
Example manifest output
[
{
"name": "<root>",
"flags": 0,
"filesys_id": 0,
"time_create": 0,
"time_access": 0,
"time_write": 0,
"group_id": 0,
"user_id": 0,
"size": 19335910709,
"size_deflated": 12934687672,
"hash": "886a0410b64e24d8318a695b7f59d37b7401e4b281d628365485502d349c53af",
"num_children": 44689,
"children": [
{
"name": "D:\\Documents",
"flags": 8,
"filesys_id": 0,
"time_create": 132532914246050287,
"time_access": 0,
"time_write": 132813120749659067,
"group_id": 0,
"user_id": 0,
"size": 8905372573,
"size_deflated": 8812494813,
"hash": "b3bb02f6ab5ef5a6f680c2abd74a0743b5d12ef3aa79d1bd147e1f16b9039949",
"num_children": 1561,
"children": [
...

Manifest Compression

Since the manifest file are text based they compress well.
Compression is enabled via the file extension.

Currently supported file extensions are:

extensionalgomodecompression level
zipzipDeflateDefault

Manifest Compression examples

info
8BitSafe-cli archive create -c zstd --manifest /mnt/backups/manifests/{user}-{nowutc}.json.zip /mnt/backups/repo::{user}-{nowutc} C:\misc

Various Examples

info
8BitSafe-cli archive create D:\backups\repo::{user}-images-{nowutc} "C:\Users\Bob\My Images"
8BitSafe-cli archive create -c lz4 D:\backups\repo::{user}-{nowutc} C:\important_docs
8BitSafe-cli archive create -c lz4,fast D:\backups\repo::{user}-{nowutc} C:\important_docs -e "*.DS_Store"
8BitSafe-cli archive create -c lz4 D:\backups\repo::{user}-{nowutc} C:\important_docs -e "*.DS_Store"
8BitSafe-cli archive create --manifest D:\manifests\{nowutc}.json.zip D:\storage\backups\repo::{user}-{nowutc} C:\misc
8BitSafe-cli archive create -c zstd,fast --abort-on-missing D:\backups\repo::{user}-{nowutc} C:\company_docs

With global options

info
8BitSafe-cli --background --filelog archive create -c lz4 D:\storage\backups\repo::{user}-{nowutc} C:\important_docs "C:\Users\Bob\My Images" -e "*.pdf"