There are several users on one PC - user1, user2... User2 has a scheduled daily backup. Will Deja Dup make user2's daily incremental backup, while user1 is logged in and using the PC?
2 Answers
Duplicity
Déjà Dup is really just a clever graphical wrapper around the command line backup tool duplicity. You can read more about it on its homepage, but basically, it uses rsync to generate incremental, encrypted backup volumes.
Scheduling
Déjà Dup does not use cron or similar schedulers. Rather, it starts a program deja-dup-monitor when you log into your session. This keeps track of when you last successfully backed up and will wait until the next scheduled backup.
It determines exactly when the next scheduled backup is largely on its own, based on the user's preferences about whether to backup once a day, once a week, etc.
Why Not Cron?
One disadvantage is that a backup can not be started while a user is not logged in. The primary use case for Déjà Dup is backing up user data, so this is not a large concern, as user data is unlikely to change while the user are not logged in.
So no.
But Deja Dup is just a graphical front end for duplicity
. Examples on automating that: Automating duplicity backups using cron or the Ubuntu wiki on duplicity.
-
What about if I log with user2, leave it, switch user and log with user1? I will have both sessions running, with user2 in the back, but will the backup run as it should?– ivanpopApr 27, 2015 at 17:54
-
It says in above you need to login. It does not state you need to stay logged in. What happens is that your session will check the backup procedure and schedule a task to execute it (and that task will remain as long as the system is up and running). So I doubt you need to keep user 2 logged in. Try it I would say ;-)– RinzwindApr 27, 2015 at 20:14
As Rinzwind said back in 2015, there is no way to schedule backups that run with no user logged in. However, even though I know the question is specific to deja dup, I will share the solution I found to solve the problem: I installed "Back in Time" (a rsync backend). Back in Time allows scheduled backups to run even if the user is not logged in. You can find it at https://github.com/bit-team/backintime or in the "Ubuntu Software" library.