Help Recovering Disk Space

I feel you bro, I did so much trail and error in the beginning, but you took the right path and made backups (OK maybe a bit too many, but better then none! :sweat_smile:) but I learned the even harder way, without backups :joy:

The dietpi-backup script offers only daily backup, but as Joulinar already mentioned, you can just use crontab for this.
Disable the daily backup in dietpi-backup, let the rest untouched.
Then you can run dietpi-cron to take some settings for the weekly cronjob, like the day and the time.
In this menu are also the corresponding folders mentioned, where you have to place a script file (in your case it is /etc/cron.weekly/, which get’s then executed every week at the time you set earlier.

Then you just create file (e.g. backup-weekly) with this content:

#!/bin/bash
/boot/dietpi/dietpi-backup 1

So in the end you have a file /etc/cron.weekly/backup-weekly.

alternative:

you could also use sudo crontab -e and create an entry there for executing the backup script, like:

0 2 * * 0 /boot/dietpi/dietpi-backup 1

Which would execute this command every sunday at 2 AM.

see also:
https://ostechnix.com/a-beginners-guide-to-cron-jobs/
https://dietpi.com/forum/t/weekly-backup-instead-daily-backup/21715/2

1 Like