diff --git a/docs/usage/copy.rst b/docs/usage/copy.rst index fe08de59d6..60c99d56e3 100644 --- a/docs/usage/copy.rst +++ b/docs/usage/copy.rst @@ -4,16 +4,16 @@ Examples ~~~~~~~~ :: - # create an archive, then keep a copy of it under a stable name: - $ borg create backup-2016-02-15 ~ - $ borg copy backup-2016-02-15 known-good + # create an archive, then copy it to an archive with a different name: + $ borg create home ~ + $ borg copy home known-good $ borg repo-list - d7b79fd3 Sat, 2026-08-29 14:39:27 +0200 backup-2016-02-15 tw MacBook-Pro + d7b79fd3 Sat, 2026-08-29 14:39:27 +0200 home tw MacBook-Pro f81040e3 Sat, 2026-08-29 14:39:27 +0200 known-good tw MacBook-Pro # the copy is an independent archive: # after deleting (and compacting away) the original, the copy is still complete. - $ borg delete backup-2016-02-15 + $ borg delete home $ borg compact $ borg extract known-good diff --git a/docs/usage/create.rst b/docs/usage/create.rst index 560bd7e6d2..eabf6c1f4b 100644 --- a/docs/usage/create.rst +++ b/docs/usage/create.rst @@ -73,9 +73,6 @@ Examples # Only compress compressible data with lzma,N (N = 0..9) $ borg create --compression auto,lzma,N arch ~ - # Use the short hostname and username as the archive name - $ borg create '{hostname}-{user}' ~ - # Back up relative paths by moving into the correct directory first $ cd /home/user/Documents # The root directory of the archive will be "projectA" diff --git a/docs/usage/delete.rst b/docs/usage/delete.rst index 35f1dfa784..38453a5684 100644 --- a/docs/usage/delete.rst +++ b/docs/usage/delete.rst @@ -12,12 +12,12 @@ Examples # Delete a specific backup archive using its unique archive ID prefix $ borg delete aid:d34db33f - # Delete all archives whose names begin with the machine's hostname followed by "-" - $ borg delete -a 'sh:{hostname}-*' + # Delete all archives created on this machine + $ borg delete -a 'host:{hostname}' - # Delete all archives whose names contain "-2012-" - $ borg delete -a 'sh:*-2012-*' + # Delete all archives created in 2012 + $ borg delete -a 'date:2012' # See what would be deleted if delete was run without --dry-run - $ borg delete --list --dry-run -a 'sh:*-May-*' + $ borg delete --list --dry-run -a 'date:2012-05' diff --git a/docs/usage/list.rst b/docs/usage/list.rst index 79ce116544..e908519638 100644 --- a/docs/usage/list.rst +++ b/docs/usage/list.rst @@ -4,7 +4,7 @@ Examples ~~~~~~~~ :: - $ borg list root-2016-02-15 + $ borg list root drwxr-xr-x root root 0 Mon, 2016-02-15 17:44:27 +0100 . drwxrwxr-x root root 0 Mon, 2016-02-15 19:04:49 +0100 bin -rwxr-xr-x root root 1029624 Thu, 2014-11-13 00:08:51 +0100 bin/bash @@ -12,7 +12,7 @@ Examples -rwxr-xr-x root root 2140 Fri, 2015-03-27 20:24:22 +0100 bin/bzdiff ... - $ borg list root-2016-02-15 --pattern "- bin/ba*" + $ borg list root --pattern "- bin/ba*" drwxr-xr-x root root 0 Mon, 2016-02-15 17:44:27 +0100 . drwxrwxr-x root root 0 Mon, 2016-02-15 19:04:49 +0100 bin lrwxrwxrwx root root 6 Fri, 2015-03-27 20:24:26 +0100 bin/bzcmp -> bzdiff diff --git a/docs/usage/mount.rst b/docs/usage/mount.rst index 57ea9a8f1c..bac112ead3 100644 --- a/docs/usage/mount.rst +++ b/docs/usage/mount.rst @@ -59,7 +59,7 @@ borgfs $ echo '/mnt/backup /tmp/myrepo fuse.borgfs defaults,noauto 0 0' >> /etc/fstab $ mount /tmp/myrepo $ ls /tmp/myrepo - root-2016-02-01 root-2016-02-15 + root-1f7b3c2a root-9e4d0b58 .. Note:: diff --git a/docs/usage/prune.rst b/docs/usage/prune.rst index 9fecbef8d0..4e85b1ae98 100644 --- a/docs/usage/prune.rst +++ b/docs/usage/prune.rst @@ -36,12 +36,11 @@ set the reference timestamp for interval calculation. # Do a dry-run without actually deleting anything. $ borg prune -v --list --dry-run --keep-daily=7 --keep-weekly=4 - # Similar to the above, but only apply to the archive series named '{hostname}': - $ borg prune -v --list --keep-daily=7 --keep-weekly=4 '{hostname}' + # Similar to the above, but only apply to the archive series named 'backup-sys-home': + $ borg prune -v --list --keep-daily=7 --keep-weekly=4 backup-sys-home - # Similar to the above, but apply to archive names starting with the hostname - # of the machine followed by a '-' character: - $ borg prune -v --list --keep-daily=7 --keep-weekly=4 -a 'sh:{hostname}-*' + # Similar to the above, but only apply to archives created on this machine: + $ borg prune -v --list --keep-daily=7 --keep-weekly=4 -a 'host:{hostname}' # Keep 7 end of day, 4 additional end of week archives, # and an end of month archive for every month: diff --git a/docs/usage/tar.rst b/docs/usage/tar.rst index 37fb03487c..0df09984eb 100644 --- a/docs/usage/tar.rst +++ b/docs/usage/tar.rst @@ -7,25 +7,25 @@ Examples :: # Export as an uncompressed tar archive - $ borg export-tar Monday Monday.tar + $ borg export-tar docs docs.tar # Import an uncompressed tar archive - $ borg import-tar Monday Monday.tar + $ borg import-tar docs docs.tar # Exclude some file types and compress using gzip - $ borg export-tar Monday Monday.tar.gz --exclude '*.so' + $ borg export-tar docs docs.tar.gz --exclude '*.so' # Use a higher compression level with gzip - $ borg export-tar --tar-filter="gzip -9" Monday Monday.tar.gz + $ borg export-tar --tar-filter="gzip -9" docs docs.tar.gz # Copy an archive from repoA to repoB $ borg -r repoA export-tar --tar-format=BORG archive - | borg -r repoB import-tar archive - # Export a tar, but instead of storing it on disk, upload it to a remote site using curl - $ borg export-tar Monday - | curl --data-binary @- https://somewhere/to/POST + $ borg export-tar docs - | curl --data-binary @- https://somewhere/to/POST # Remote extraction via 'tarpipe' - $ borg export-tar Monday - | ssh somewhere "cd extracted; tar x" + $ borg export-tar docs - | ssh somewhere "cd extracted; tar x" # Export sparse files (e.g. disk images) as sparse tar members (GNU sparse format 1.0) $ borg export-tar --sparse disk-images disk-images.tar diff --git a/src/borg/archiver/completion_cmd.py b/src/borg/archiver/completion_cmd.py index e6d1fe766d..4bad76baad 100644 --- a/src/borg/archiver/completion_cmd.py +++ b/src/borg/archiver/completion_cmd.py @@ -13,7 +13,7 @@ The following argument types have intelligent, context-aware completion: 1. Archive names/IDs (archivename_validator): - - Completes archive names by default (e.g., "my-backup-2024") + - Completes archive names by default (e.g., "my-backup") - Completes archive IDs when prefixed with "aid:" (e.g., "aid:12345678") - In zsh and fish, shows archive metadata (name, timestamp, user@host) as descriptions (tcsh has no completion descriptions)