-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
restic.cheat
24 lines (17 loc) · 985 Bytes
/
restic.cheat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
% restic
$ repository: echo "$RESTIC_REPOSITORY"
$ snapshot_id: restic -r $RESTIC_REPOSITORY snapshots
# Restoring snapshot to a specific directory
restic -r <repository> restore <snapshot_id> --target <restore_dir>
# Restoring snapshot from a specific host to a specific directory
restic -r <repository> restore <snapshot_id> --target <restore_dir> --host <host>
# Restoring a folder/file form a snapshot to a specific directory
restic -r <repository> restore <snapshot_id> --target <restore_dir> --include <include>
# Restoring a snapshot except a given folder/file to a specific directory
restic -r <repository> restore <snapshot_id> --target <restore_dir> --exclude <exclude>
# Compare two snapshots
restic -r <repository> diff <snapshot_id1> <snapshot_id2>
# Backup a folder with restic
restic -r <repository> --verbose backup <source>
# Backup a folder with restic excluding files with a file
restic -r <repository> --verbose backup <source> --exclude-file=<exclude_file>