2017-11-18 03:52:18 +00:00
|
|
|
# borg
|
|
|
|
|
|
|
|
> Deduplicating backup tool.
|
|
|
|
> Creates local or remote backups that are mountable as filesystems.
|
2019-04-11 17:25:49 +01:00
|
|
|
> Homepage: <https://borgbackup.readthedocs.io/en/stable/usage/general.html>.
|
2017-11-18 03:52:18 +00:00
|
|
|
|
|
|
|
- Initialise a (local) repository:
|
|
|
|
|
2019-02-11 18:00:49 +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
|
|
|
|
2019-02-11 18:00:49 +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:
|
|
|
|
|
2019-02-11 18:00:49 +00:00
|
|
|
`borg list {{/path/to/repo_directory}}`
|
2017-11-18 03:52:18 +00:00
|
|
|
|
2019-02-11 18:00:49 +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
|
|
|
|
2019-02-11 18:00:49 +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:
|
|
|
|
|
2019-02-11 18:00:49 +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:
|
|
|
|
|
2019-02-11 18:00:49 +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`
|