2018-02-05 09:18:52 +00:00
|
|
|
# restic
|
|
|
|
|
|
|
|
> Fast, secure, efficient backup program.
|
2019-05-15 09:29:32 +01:00
|
|
|
> Homepage: <https://restic.net>.
|
2018-02-05 09:18:52 +00:00
|
|
|
|
|
|
|
- Initialize a backup repository in the specified local directory:
|
|
|
|
|
|
|
|
`restic init -r {{path/to/repository}}`
|
|
|
|
|
2019-02-11 18:00:49 +00:00
|
|
|
- Backup a directory to the repository:
|
2018-02-05 09:18:52 +00:00
|
|
|
|
2019-02-11 18:00:49 +00:00
|
|
|
`restic -r {{path/to/repository}} backup {{path/to/directory}}`
|
2018-02-05 09:18:52 +00:00
|
|
|
|
|
|
|
- Show backup snapshots currently stored in the repository:
|
|
|
|
|
|
|
|
`restic -r {{path/to/repository}} snapshots`
|
|
|
|
|
|
|
|
- Restore a specific backup snapshot to a target directory:
|
|
|
|
|
|
|
|
`restic -r {{path/to/repository}} restore {{snapshot_id}} {{path/to/target}}`
|
|
|
|
|
2018-11-24 10:10:08 +00:00
|
|
|
- Restore a specific path from a specific backup to a target directory:
|
|
|
|
|
|
|
|
`restic -r {{path/to/repository}} --include {{path/to/restore}} --target {{path/to/target}} restore {{snapshot_id}}`
|
|
|
|
|
2018-02-05 09:18:52 +00:00
|
|
|
- Clean up the repository and keep only the most recent snapshot of each unique backup:
|
|
|
|
|
|
|
|
`restic forget --keep-last 1 --prune`
|