mirror of
https://github.com/borgbackup/borg.git
synced 2025-02-08 15:37:09 +00:00
Update docs on deleting multiple archives
This commit is contained in:
parent
3931340baa
commit
b3c1104760
2 changed files with 21 additions and 1 deletions
|
@ -7,6 +7,15 @@ Examples
|
||||||
# delete a single backup archive:
|
# delete a single backup archive:
|
||||||
$ borg delete /path/to/repo::Monday
|
$ borg delete /path/to/repo::Monday
|
||||||
|
|
||||||
|
# delete all archives whose names begin with the machine's hostname followed by "-"
|
||||||
|
$ borg delete --prefix '{hostname}-' /path/to/repo
|
||||||
|
|
||||||
|
# delete all archives whose names contain "-2012-"
|
||||||
|
$ borg delete --glob-archives '*-2012-*' /path/to/repo
|
||||||
|
|
||||||
|
# see what would be deleted if delete was run without --dry-run
|
||||||
|
$ borg delete -v --dry-run -a '*-May-*' /path/to/repo
|
||||||
|
|
||||||
# delete the whole repository and the related local cache:
|
# delete the whole repository and the related local cache:
|
||||||
$ borg delete /path/to/repo
|
$ borg delete /path/to/repo
|
||||||
You requested to completely DELETE the repository *including* all archives it contains:
|
You requested to completely DELETE the repository *including* all archives it contains:
|
||||||
|
|
|
@ -3171,12 +3171,23 @@ def define_archive_filters_group(subparser, *, sort_by=True, first_last=True):
|
||||||
delete_epilog = process_epilog("""
|
delete_epilog = process_epilog("""
|
||||||
This command deletes an archive from the repository or the complete repository.
|
This command deletes an archive from the repository or the complete repository.
|
||||||
Disk space is reclaimed accordingly. If you delete the complete repository, the
|
Disk space is reclaimed accordingly. If you delete the complete repository, the
|
||||||
local cache for it (if any) is also deleted.
|
local cache for it (if any) is also deleted. Alternatively, you can delete just
|
||||||
|
the local cache with the ``--cache-only`` option.
|
||||||
|
|
||||||
When using ``--stats``, you will get some statistics about how much data was
|
When using ``--stats``, you will get some statistics about how much data was
|
||||||
deleted - the "Deleted data" deduplicated size there is most interesting as
|
deleted - the "Deleted data" deduplicated size there is most interesting as
|
||||||
that is how much your repository will shrink.
|
that is how much your repository will shrink.
|
||||||
Please note that the "All archives" stats refer to the state after deletion.
|
Please note that the "All archives" stats refer to the state after deletion.
|
||||||
|
|
||||||
|
You can delete multiple archives by specifying their common prefix, if they
|
||||||
|
have one, using the ``--prefix PREFIX`` option. You can also specify a shell
|
||||||
|
pattern to match multiple archives using the ``--glob-archives GLOB`` option
|
||||||
|
(for more info on these patterns, see ``borg help patterns``). Note that these
|
||||||
|
two options are mutually exclusive.
|
||||||
|
|
||||||
|
To avoid accidentally deleting archives, especially when using glob patterns,
|
||||||
|
it might be helpful to use the ``--dry-run`` to test out the command without
|
||||||
|
actually making any changes to the repository.
|
||||||
""")
|
""")
|
||||||
subparser = subparsers.add_parser('delete', parents=[common_parser], add_help=False,
|
subparser = subparsers.add_parser('delete', parents=[common_parser], add_help=False,
|
||||||
description=self.do_delete.__doc__,
|
description=self.do_delete.__doc__,
|
||||||
|
|
Loading…
Reference in a new issue