Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


I am using rsnapshot to backup my machines to a remote nfs nas device. This is somewhat tricky to use with my laptop since it is not guaranteed to be online at a specific time and for a necessary time span. Also, the user needs to be logged in due to ecryptfs <> nfs difficulties. Because of that, I trigger the backup on user login using upstart. I also do a simple time check because it is possible for the user to boot more than once a day and running backups every time would be inefficient. If the user decides to reboot/poweroff/logout before the backup is complete, a problem arises. A resume function is not supported in rsnapshot as far as I know and having an incomplete backup is very undesirable.


Is there a way to "warn" the user if he wishes to reboot/poweroff/logout from gnome (unity/lightdm?) session before the backup being completed? I am thinking of something similar to the dialog saying "Program xy is still active [...]". It would be nice if this could be done via some programmatic condition, eg if [ -e /run/backup_is_running]; then show_warning(); fi

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.