I have configured Back In Time and MySQL Administrator to make a backup every day at 15:00. In order to be sure I have installed Gnome Scheduler to see whether these two applications are registered there. They are registered in gnome scheduler but they don't perform back up operation.
Here is the screenshot of Gnome Scheduler.
How can I solve this problem?
UPDATE
The output of crontab -l
command is following:
bakhtiyor@ubuntu-vm:~$ crontab -l
0 15 * * * /usr/bin/mabackup -d /home/bakhtiyor/backup/MySQL -x my-backup profile # JOB_ID_3
0 15 * * * nice -n 19 /usr/bin/backintime --backup-job # JOB_ID_2
UPDATE 2
The output of grep CRON /var/log/syslog
command is following:
Nov 30 11:39:01 ubuntu-vm CRON[7663]: (root) CMD ( [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -n 200 -r -0 rm)
Nov 30 11:39:02 ubuntu-vm CRON[7661]: (CRON) info (No MTA installed, discarding output)
Gnome Scheduler is just a pretty front-end for
at
andcrontab
. And in default Ubuntu,cron
mostly runsanacron
which is responsible for running periodic tasks on machines that may not be on when the task is supposed to fire.Things to check are:
ps -C cron
cat /etc/crontab
ls /usr/sbin/anacron
grep CRON /var/log/syslog
For the last step,
logrotate
may have archived older syslogs so if grep gives no result tryMy guess is that gnome-scheduler is setting up jobs with the wrong permissions (probably as you and not a superuser) and therefore the complaints will appear in the syslogs.
response to update
Given the shell prompt in your
crontab -l
example, you almost certainly listed bakhtiyor's per user crontab which may not have the permissions to run your (somewhat opaque) jobs.The syslog entries will show if the jobs are being run at all, and if so, if the jobs complain.
Based on your log entries, it looks like your jobs did not run recently.
You should also check the archived cron logs, because it might have turned over since they last run.
To debug this further I would add this job, using
crontab -e
and see if that sends you mail, and whether it appears in the log file.
update: If it's appearing in the log file but not sending you mail, then you might need to either install a mail agent to see the output from your backup jobs, or run them with output redirected into a log file. For instance, you could use
crontab -e
to change one line toyou will need to create the
~/log
directory.This solution worked for me: https://answers.launchpad.net/backintime/+question/90513
My job configuration was saved under my user and not root because I was using
sudo backintime-gnome
and notgksu backintime-gnome
.sudo will not change HOME environ which causes problems:
I had the same issue and solved it by adding my username to the crontab group.
/etc/group
I had a similar problem which gave me quite a runaround. Assuming cron, crontab and anacron are healthy, the key symptom is that the task runs correctly if invoked using gnome-schedule's "run now" button, but does not run as scheduled once left alone.
This turns out to be mostly a graphical environment issue. My recommendation is to create a wrapper for the task script, e.g. "task-wrapper":
Make sure the task-wrapper file is executable, and create the task in gnome-schedule as an X application. Alternately, write it like this:
The /home/username/task script will now run in a console window which will close upon completion. My scripts typically require sudo authentication, so I start the "task" script like this:
The cd command is inoccuous, the MESSAGE explains what the script is requesting authorization for, and 'set -e' ensures the script aborts if the user hits 'Cancel'. The remainder of the script can use simple 'sudo' calls which will succeed unless a lot of time elapses between commands.
Under Ubuntu 12.04, crontab group membership doesn't seem to be required.