Make backups with restic and the GNOME Keyring
by rusty-snake
# Add your password to the keyring.
$ secret-tool store --label='Password for: restic - Backups done right!' type password application net.restic.restic
# Set RESTIC_PASSWORD_COMMAND, ideally you add this to your .bashrc/.zshrc.
$ export RESTIC_PASSWORD_COMMAND="secret-tool lookup type password application net.restic.restic"
# Initialize a new repository
$ restic init --repo /path/to/backup
# Do the backup
$ restic backup --repo /path/to/backup --exclude-caches --exclude-file restic-excludes.txt $HOME
restic-excludes.txt
example:
*.iso
*.rpm
*.o
*.pyc
__pycache__
$HOME/.bundle
$HOME/.cargo
$HOME/.rustup
$HOME/.cache
$HOME/.var/app/*/cache
$HOME/.local/share/flatpak
$HOME/.local/share/containers
$HOME/.local/share/gnome-boxes
$HOME/.local/share/Trash
Restic Documentation: https://restic.readthedocs.io/en/stable/
tags: