Simple scripts to backup using restic.
- restic
Arch Linux:
sudo pacman -S resticFedora:
sudo dnf install resticUbuntu:
sudo apt install restic- Modify and copy the scripts to
~/.local/bin(make sure it's in yourPATH) - Run
restic-repo initto create the restic repository - Run
restic-repo-backupto make a backup
If the parent directory is excluded you can't include anything inside it. So we first include the parent directory then exclude everything inside it. After that we include the directory we want to include.
# exclude everything in $HOME
$HOME/*
# include $HOME/.config
!$HOME/.config
# exclude everything in $HOME/.config
$HOME/.config/*
# include $HOME/.config/nvim
!$HOME/.config/nvim
Because whenever files and directories included with the flag change, restic will fail to detect the parent snapshot.