Restic documentation: https://restic.readthedocs.io/en/stable/010_introduction.html
This is simply a wrapper to make restic easier to use. Its usage is intended to an initialized restic repository. See here hot to initialize new repository.
To use this wrapper you have to configure two things: at least one namespace
and password
file path.
Namespace is made-up from three variables that contains three paths:
exclude_<repo_name>
- The path to the.txt
file that contains the restic repo password.repo_<repo_name>
- The path to the destination folder (The one initialized with the restic repo).host_<repo_name>
- The source folder.
Example:
exclude_documents=~/Documents/excludes_documents.txt
repo_documents=/mnt/Synology/Home/Backup/Documents
host_documents=~/Documents
Note that the namespace is the documents
suffix
Currently, this wrapper assumes that each repository relies on same password. So you just have to edit
the PWD_FILE
variable.
Example:
PWD_FILE~/Documents/restic/resticp.txt
Create a snapshot
restic-backups backup <namespace>
Delete old snapshots except last ${KEEP_LAST} (deleting data as well)
restic-backups prune <namespace>
Delete a specific snapshot (also deleting the data)
restic-backups prune_single <hash_snapshot>
List snapshots
restic-backups snapshots <namespace>
Restore a snapshot
restic-backups restore <namespace> <hash_snapshot> /destination/folder