1

I love Dejadup but I really want to be able to backup every hour or half an hour. I do a lot of work with files on my computer so I would need such an option. I believe the only way to do it is to schedule tasks like dejadup-backup every hour or so, but how can I do that on Ubuntu 18.04?

Thanks!

Tio TROM
  • 663
  • 13
  • 28
  • 1
    for so much backup, do you want to remove the oldest ones? – damadam Jul 11 '18 at 14:06
  • I believe it does incremental backups so new backups wont add much to the entire backup. Also dejadup deletes anything that's older than 6 months. – Tio TROM Jul 11 '18 at 14:09
  • be careful with that, you can modify a file without seeing something bad, but when you will restart the computer, problems can happen – damadam Jul 11 '18 at 14:10

1 Answers1

1

You can launch a deja-dup backup with the command deja-dup --backup.

With a cron job, you can automatically execute that command every so much time. This Askubuntu question provides stepwise instructions on how you can set up a cronjob.

For cron, you need the full path name to the application you want to run. You can find out the full path of deja-dup with the command:

$ which deja-dup
/usr/bin/deja-dup

To launch deja-dup as a cron job, we will thus use /usr/bin/deja-dup in this example.

To edit the crontab file for adding or editing a job, one uses the command crontab -e. This opens the crontab file in an editor, typically nano. You need to add one line for a job. In this case, to have your cornjob run every 30 minutes, your line may read

*/30 * * * * /usr/bin/deja-dup --backup
vanadium
  • 88,010
  • Not working. tio@tio:~$ crontab -l /5 * * * /usr/bin/deja-dup --backup To test it and doesn't work. I even rebooted the computer. Nothing. No cron job starts. Am I missing something? – Tio TROM Jul 12 '18 at 21:52
  • I went here https://help.ubuntu.com/community/CronHowto and I tried so many ways. Nothing worked...now I messed up the normal dejadup cron and that's not working either. – Tio TROM Jul 13 '18 at 03:55
  • There is only one way: you need to edit your crontab as a user with the command "crontab -e" and then add the line for the job. The command will run only while you are logged in this way. – vanadium Jul 13 '18 at 08:35
  • That's exactly what I did. But no good luck...the cron job is not working. Why could that be? – Tio TROM Jul 13 '18 at 12:36