Script collection to create incement backups on btrfs filesystem with systemd.
- Move backup.service and backup.timer to systemd (e.g. /etc/systemd/system or /usr/lib/systemd/system)
- Change the UUID in backup.service to match your source BTRFS device and your destination BTRFS device
- Change the last param in backup.service ExecStart to match your BTRFS subvolume
- Move backup.sh to /usr/loca/bin/ and make it executable
chmod +x /usr/local/bin/backup.sh
- Execute
systemctl daemon-reload
- Execute
systemctl start backup.service
for a initial test and verify everything looks like expected
- If not have a look to
systemctl status backup.service
- Change the backup.timer OnCalendar property to your needs
- Execute
systemctl start backup.timer
andsystemctl enable backup.timer
to enable it permanent
You are done :)