2017-11-18 03:52:18 +00:00
|
|
|
# borg
|
|
|
|
|
|
|
|
> Deduplicating backup tool.
|
|
|
|
> Creates local or remote backups that are mountable as filesystems.
|
2019-06-03 01:06:36 +01:00
|
|
|
> More information: <https://borgbackup.readthedocs.io/en/stable/usage/general.html>.
|
2017-11-18 03:52:18 +00:00
|
|
|
|
2022-06-27 11:23:12 +01:00
|
|
|
- Initialize a (local) repository:
|
2017-11-18 03:52:18 +00:00
|
|
|
|
2020-10-28 17:19:43 +00:00
|
|
|
`borg init {{path/to/repo_directory}}`
|
2017-11-18 03:52:18 +00:00
|
|
|
|
2019-02-11 18:00:49 +00:00
|
|
|
- Backup a directory into the repository, creating an archive called "Monday":
|
2017-11-18 03:52:18 +00:00
|
|
|
|
2020-10-28 17:19:43 +00:00
|
|
|
`borg create --progress {{path/to/repo_directory}}::{{Monday}} {{path/to/source_directory}}`
|
2017-11-18 03:52:18 +00:00
|
|
|
|
|
|
|
- List all archives in a repository:
|
|
|
|
|
2020-10-28 17:19:43 +00:00
|
|
|
`borg list {{path/to/repo_directory}}`
|
2017-11-18 03:52:18 +00:00
|
|
|
|
2021-01-31 17:05:18 +00:00
|
|
|
- Extract a specific directory from the "Monday" archive in a remote repository, excluding all `*.ext` files:
|
2017-11-18 03:52:18 +00:00
|
|
|
|
2020-10-28 17:19:43 +00:00
|
|
|
`borg extract {{user}}@{{host}}:{{path/to/repo_directory}}::{{Monday}} {{path/to/target_directory}} --exclude '{{*.ext}}'`
|
2017-11-18 03:52:18 +00:00
|
|
|
|
|
|
|
- Prune a repository by deleting all archives older than 7 days, listing changes:
|
|
|
|
|
2020-10-28 17:19:43 +00:00
|
|
|
`borg prune --keep-within {{7d}} --list {{path/to/repo_directory}}`
|
2017-11-18 03:52:18 +00:00
|
|
|
|
|
|
|
- Mount a repository as a FUSE filesystem:
|
|
|
|
|
2020-10-28 17:19:43 +00:00
|
|
|
`borg mount {{path/to/repo_directory}}::{{Monday}} {{path/to/mountpoint}}`
|
2017-11-18 03:52:18 +00:00
|
|
|
|
|
|
|
- Display help on creating archives:
|
|
|
|
|
|
|
|
`borg create --help`
|