How can I set up hourly Deja-Dup backups?
Solution 1:
Install Scheduled Tasks
:
Add a job to it with the following parameters (replace every minute with every hour or the schedule you want to use):
You can even hide the pop-up window by using deja-dup --backup --auto
as the command or use X-Application: suppress outup
in the default behavior drop box, it will hide the window while deja-dup runs.
Solution 2:
Although it seems like the Déjà Dup code could not be easily modified to accomodate an hourly option, backups can be manually initiated and this can easily be added as a cron
job that runs on the hour.
Here are the steps you need to take:
-
Run the following two commands in a terminal to enable local access to the X server:
xhost +local: xhost
-
Now run this command:
crontab -e
If asked to select an editor, go with
/bin/nano
.-
Go to the bottom of the file and add the following line (followed by a blank line):
15 * * * * env DISPLAY=:0 /usr/bin/deja-dup --backup
If you selected
nano
in step 2, press Ctrl+O followed by Enter and Ctrl+X. (If not, then use the appropriate commands for your editor to save the file and exit.)
You're done! Your backups will now take place 15 minutes after the start of each hour (12:15, 1:15, etc.)