SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
Find out Failed Backup
Author Message
Post Find out Failed Backup 
Hi all

I back up a directory to a remote system by rdiff-backup and I'm doing it as periodic cron jobs. How can I find out that a back-up session failed? I saw an entry at the FAQ that told about two current_mirror_XXXX files with different dates. Is it enough to check this situation?

THanks for any comment.

Post Find out Failed Backup 
Hi,

Run rdiff-backup from a script and log the results and then check the log is one way.
Now that I think of it cron may already be doing the above.
Or run rdiff-backup via backupninja and get the results emailed to you.

Cheers
Gavin

Mozafar Roshany wrote: Hi all

I back up a directory to a remote system by rdiff-backup and I'm doing it as periodic cron jobs. How can I find out that a back-up session failed? I saw an entry at the FAQ that told about two current_mirror_XXXX files with different dates. Is it enough to check this situation?

THanks for any comment.


_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users < at > nongnu.org ([email]rdiff-backup-users < at > nongnu.org[/email])
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

Post Find out Failed Backup 
On Sun, Jan 10, 2010 at 09:50:39AM +1000, Gavin wrote:
Hi all

I back up a directory to a remote system by rdiff-backup and I'm doing
it as periodic cron jobs. How can I find out that a back-up session
failed? I saw an entry at the FAQ that told about two
current_mirror_XXXX files with different dates. Is it enough to check
this situation?

Any output (i.e. an error or warning) from rdiff-backup will be
E-Mailed by cron to the owner of the cron job. So, if rdiff-backup
runs totally successfully you will get no output, if it fails you will
get an error message.

If the owner of the cron job isn't a user who reads mail then you can
set the environment variable MAILTO in the crontab to send the mail
where you want, i.e. add a line like the following to your crontab:-

MAILTO=gavin < at > wherever.gavin,reads.mail

If you want to get confirmation that the crontab has been run then you
can put simple 'echo' lines in the script that runs rdiff-backup. They
will then appear as mail sent to the above MAILTO user.

(All the above applies to cron on modern Linux, if your rdiff-backup
is running on something else then read the man pages for cron and
crontab to confirm it's the same)

--
Chris Green



_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users < at > nongnu.org
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

Post Find out Failed Backup 
Mozafar Roshany schrieb:
Hi all

I back up a directory to a remote system by rdiff-backup and I'm doing
it as periodic cron jobs. How can I find out that a back-up session
failed? I saw an entry at the FAQ that told about two
current_mirror_XXXX files with different dates. Is it enough to check
this situation?

Having two current_mirror files means that the last session was aborted.
But: Having only one current_mirror does not neccessarily mean that
everything went well. When rdiff-backup fails to write to the
destination or crashes early (out of memory or something) you would not
notice.

Looking if there was any output is a good idea, an other option is to
check the return code of rdiff-backup (from the man page):

EXIT STATUS
If rdiff-backup finishes successfully, the exit status will be 0. If
there is an unrecoverable (critical) error, it will be non-zero (usu‐
ally 1, but don't depend on this specific value). When setting up
rdiff-backup to run automatically (as from cron(Cool or similar) it is
probably a good idea to check the exit code.



Jakob


_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users < at > nongnu.org
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB