Dear/madam,
This tutorial is for those only who have learned the hard way that "daily backup" in cheap hosting means "weekly if you are lucky." I am using restic and rclone on Debian itself.
Step 1: Install restic only from backports. The stable version itself is too old.
#!/bin/bash
export RESTIC_PASSWORD="your-password-here"
export B2_ACCOUNT_ID="your-key"
export B2_ACCOUNT_KEY="your-secret"
restic -r rclone:b2:mybucket backup /var/www
restic -r rclone:b2:mybucket forget --keep-daily 7 --keep-weekly 4Step 2: Cron at 3 AM itself. Kindly redirect output to /dev/null or your mailbox will cry.Step 3: Test your restore. I am requesting this sincerely. Do not be the person who discovers corruption after the incident.
Questions are welcome only from those who have read the documentation first.
Regards,
Priya