Skip to content

matiux/restic-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Restic wrapper

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

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

Password

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

Available commands

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages