colucix,
Thanks for that answer. An update for any debian users (I'm using Mint15 but Ubuntu etc should be the same).
I am using rdiffbackup so call a script that drives it. My command line is:
Code:
04 07 * * * env DISPLAY=:0.0 gnome-terminal -e /home/of user/.rdiffbackup
With gnome-terminal you can choose behaviour of the terminal when the command finishes. In my case I wanted the terminal to disappear if all backups complete successfully so I didn't. Instead I use the read command after an error to pause the terminal, awaiting user input.
A note for any
rdiffbackup users having issues with cron. Cron has a very limited user environment compared with your terminal so you may have to fill in some missing variables for the SSH to work for rdiffbackup. In my case I needed to fill in SSH_AGENT_PID and SSH_AUTH_SOCK - the code is for the fish shell ... substituted " for the brackets around the command if you're using bash. The second assumes that the folder *keyring-* and associated file *ssh* is within /run - if its not then find out where your distro hides it and change it (the originator of this idea was searching /tmp for it).
Code:
set -x SSH_AGENT_PID (ps axww | grep -v grep | grep ssh-agent | grep -o -e [0-9][0-9][0-9][0-9])
set -x SSH_AUTH_SOCK (find /run/ -path '*keyring-*' -name '*ssh*' -print 2>/dev/null)
I include this in an old thread because google only cares about hit counts