Fast howto: Weekly backup of your home dir with systemd timers and duplicity

Disclaimer: “Fast howto” means in my world just dumping my config files for everyone to use, explanations are optional. 🙂


Hint: duplicity is very good in encrypting your backuped data, but my backup data disks are already encrypted through luks, so I’m not using this feature!


Description=weekly full home directory backup

# see systemd.time(7) manual page for other scheduling options
# run immediately if we missed a backup for some reason



Description=full home backup




#backup to my NAS through NFS mount 
#(mounted at boot)
duplicity --no-encryption --asynchronous-upload --volsize 100 -v6 --exclude '**/*/.cache' --exclude '**/whatever/you/like'  /home file:///mnt/your/backup/path

Further hints:

#maybe a reload is needed
systemctl daemon-reload
#run manually (for testing maybe?)
systemctl start homeBackup.service
#enable timer
systemctl enable homeBackup.timer
#just enabling is not enough! 
#start the timer
systemctl start homeBackup.timer
#after start the first run starts immediately, after that at the specified time stamps with "OnCalendar"
#check all timers (with inactives, --all)
systemctl list-timers --all
#check backup log
journalctl -u homeBackup.service