Skip to content

Commit 2a0e572

Browse files
Merge pull request #10528 from ThomasWaldmann/docs-archive-series
docs: use archive series names instead of borg 1.x style names
2 parents 45f8b17 + 7ed9b55 commit 2a0e572

8 files changed

Lines changed: 24 additions & 28 deletions

File tree

‎docs/usage/copy.rst‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ Examples
44
~~~~~~~~
55
::
66

7-
# create an archive, then keep a copy of it under a stable name:
8-
$ borg create backup-2016-02-15 ~
9-
$ borg copy backup-2016-02-15 known-good
7+
# create an archive, then copy it to an archive with a different name:
8+
$ borg create home ~
9+
$ borg copy home known-good
1010
$ borg repo-list
11-
d7b79fd3 Sat, 2026-08-29 14:39:27 +0200 backup-2016-02-15 tw MacBook-Pro
11+
d7b79fd3 Sat, 2026-08-29 14:39:27 +0200 home tw MacBook-Pro
1212
f81040e3 Sat, 2026-08-29 14:39:27 +0200 known-good tw MacBook-Pro
1313

1414
# the copy is an independent archive:
1515
# after deleting (and compacting away) the original, the copy is still complete.
16-
$ borg delete backup-2016-02-15
16+
$ borg delete home
1717
$ borg compact
1818
$ borg extract known-good
1919

‎docs/usage/create.rst‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@ Examples
7373
# Only compress compressible data with lzma,N (N = 0..9)
7474
$ borg create --compression auto,lzma,N arch ~
7575

76-
# Use the short hostname and username as the archive name
77-
$ borg create '{hostname}-{user}' ~
78-
7976
# Back up relative paths by moving into the correct directory first
8077
$ cd /home/user/Documents
8178
# The root directory of the archive will be "projectA"

‎docs/usage/delete.rst‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ Examples
1212
# Delete a specific backup archive using its unique archive ID prefix
1313
$ borg delete aid:d34db33f
1414

15-
# Delete all archives whose names begin with the machine's hostname followed by "-"
16-
$ borg delete -a 'sh:{hostname}-*'
15+
# Delete all archives created on this machine
16+
$ borg delete -a 'host:{hostname}'
1717

18-
# Delete all archives whose names contain "-2012-"
19-
$ borg delete -a 'sh:*-2012-*'
18+
# Delete all archives created in 2012
19+
$ borg delete -a 'date:2012'
2020

2121
# See what would be deleted if delete was run without --dry-run
22-
$ borg delete --list --dry-run -a 'sh:*-May-*'
22+
$ borg delete --list --dry-run -a 'date:2012-05'
2323

‎docs/usage/list.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ Examples
44
~~~~~~~~
55
::
66

7-
$ borg list root-2016-02-15
7+
$ borg list root
88
drwxr-xr-x root root 0 Mon, 2016-02-15 17:44:27 +0100 .
99
drwxrwxr-x root root 0 Mon, 2016-02-15 19:04:49 +0100 bin
1010
-rwxr-xr-x root root 1029624 Thu, 2014-11-13 00:08:51 +0100 bin/bash
1111
lrwxrwxrwx root root 6 Fri, 2015-03-27 20:24:26 +0100 bin/bzcmp -> bzdiff
1212
-rwxr-xr-x root root 2140 Fri, 2015-03-27 20:24:22 +0100 bin/bzdiff
1313
...
1414

15-
$ borg list root-2016-02-15 --pattern "- bin/ba*"
15+
$ borg list root --pattern "- bin/ba*"
1616
drwxr-xr-x root root 0 Mon, 2016-02-15 17:44:27 +0100 .
1717
drwxrwxr-x root root 0 Mon, 2016-02-15 19:04:49 +0100 bin
1818
lrwxrwxrwx root root 6 Fri, 2015-03-27 20:24:26 +0100 bin/bzcmp -> bzdiff

‎docs/usage/mount.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ borgfs
5959
$ echo '/mnt/backup /tmp/myrepo fuse.borgfs defaults,noauto 0 0' >> /etc/fstab
6060
$ mount /tmp/myrepo
6161
$ ls /tmp/myrepo
62-
root-2016-02-01 root-2016-02-15
62+
root-1f7b3c2a root-9e4d0b58
6363

6464
.. Note::
6565

‎docs/usage/prune.rst‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,11 @@ set the reference timestamp for interval calculation.
3636
# Do a dry-run without actually deleting anything.
3737
$ borg prune -v --list --dry-run --keep-daily=7 --keep-weekly=4
3838

39-
# Similar to the above, but only apply to the archive series named '{hostname}':
40-
$ borg prune -v --list --keep-daily=7 --keep-weekly=4 '{hostname}'
39+
# Similar to the above, but only apply to the archive series named 'backup-sys-home':
40+
$ borg prune -v --list --keep-daily=7 --keep-weekly=4 backup-sys-home
4141

42-
# Similar to the above, but apply to archive names starting with the hostname
43-
# of the machine followed by a '-' character:
44-
$ borg prune -v --list --keep-daily=7 --keep-weekly=4 -a 'sh:{hostname}-*'
42+
# Similar to the above, but only apply to archives created on this machine:
43+
$ borg prune -v --list --keep-daily=7 --keep-weekly=4 -a 'host:{hostname}'
4544

4645
# Keep 7 end of day, 4 additional end of week archives,
4746
# and an end of month archive for every month:

‎docs/usage/tar.rst‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,25 @@ Examples
77
::
88

99
# Export as an uncompressed tar archive
10-
$ borg export-tar Monday Monday.tar
10+
$ borg export-tar docs docs.tar
1111

1212
# Import an uncompressed tar archive
13-
$ borg import-tar Monday Monday.tar
13+
$ borg import-tar docs docs.tar
1414

1515
# Exclude some file types and compress using gzip
16-
$ borg export-tar Monday Monday.tar.gz --exclude '*.so'
16+
$ borg export-tar docs docs.tar.gz --exclude '*.so'
1717

1818
# Use a higher compression level with gzip
19-
$ borg export-tar --tar-filter="gzip -9" Monday Monday.tar.gz
19+
$ borg export-tar --tar-filter="gzip -9" docs docs.tar.gz
2020

2121
# Copy an archive from repoA to repoB
2222
$ borg -r repoA export-tar --tar-format=BORG archive - | borg -r repoB import-tar archive -
2323

2424
# Export a tar, but instead of storing it on disk, upload it to a remote site using curl
25-
$ borg export-tar Monday - | curl --data-binary @- https://somewhere/to/POST
25+
$ borg export-tar docs - | curl --data-binary @- https://somewhere/to/POST
2626

2727
# Remote extraction via 'tarpipe'
28-
$ borg export-tar Monday - | ssh somewhere "cd extracted; tar x"
28+
$ borg export-tar docs - | ssh somewhere "cd extracted; tar x"
2929

3030
# Export sparse files (e.g. disk images) as sparse tar members (GNU sparse format 1.0)
3131
$ borg export-tar --sparse disk-images disk-images.tar

‎src/borg/archiver/completion_cmd.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
The following argument types have intelligent, context-aware completion:
1414
1515
1. Archive names/IDs (archivename_validator):
16-
- Completes archive names by default (e.g., "my-backup-2024")
16+
- Completes archive names by default (e.g., "my-backup")
1717
- Completes archive IDs when prefixed with "aid:" (e.g., "aid:12345678")
1818
- In zsh and fish, shows archive metadata (name, timestamp, user@host) as descriptions
1919
(tcsh has no completion descriptions)

0 commit comments

Comments
 (0)