Daily backup errors
I'm using ZCS 5.0.2 and I'm using the Open Source backup procedure. Since few day ago, all the time I receive this e-mail:
Date: 13-03-2008, Thursday, 00:00 Hours
Stopping Zimbra: Success
Rsync Zimbra: Some Problem Occurred. Please check.
Starting Zimbra: Success
Zimbra was off-line for: 2912 seconds
Rotating Backup: Removed /bkp/11-02-2008-Monday-00-00-1202680801
The backup took: 2967 seconds
Where I see the errors? Where is the log?
I see that this error it's connected to "zmremrsyncstat" function from backup script.
Anybody can give me an advice?
I would make a guess at a problem removing an old backup or creating a new directory.
would you run the following commands so that we can check the permissions :-
ls -ld /bkp
ls -lR /bkp
I'm not sure...
The new folder it's created...the old folder is removed...
I try to follow the system log (on Open SuSe 10.3) but I can't find anything....
Not all of CRON backup jobs are errors...for example yesterday was OK; it's not a folder permision issue...
Date: 12-03-2008, Wednesday, 00:00 Hours Stopping Zimbra: Success Rsync Zimbra: Successfully created /bkp/12-03-2008-Wednesday-00-00-1205272801
Starting Zimbra: Success
Zimbra was off-line for: 1980 seconds
Rotating Backup: Removed /bkp/10-02-2008-Sunday-00-00-1202594402
The backup took: 2030 seconds
What error can be?
If you run the script manually, I believe it will show you the errors as rsync runs. I think.
Looking at the Perl module for RSYNC I believe that it writes stdin/stdout to a array, so you would have to modify the code (using Dumper) to print out the contents.
How large is your backup file? Half an hour offline seems a little excessive to me. How many users/how much data/what hardware specs?
Originally Posted by socate
I ask because my backup takes far less time than this. Total of 33 active accounts, roughly 3.5 or 4 GB total data and programs compressed to 2.2GB of backup file, and according to my zimbra.log file, the actual downtime on my server was about three minutes from the "stopping Zimbra" entry to the "Status OK" one. It takes more time to tar and compress the archive, and to ftp it off to another machine, but the actual down and backup time is very quick. I use the simplest and least feature-rich of all the backup scripts on the wiki, but I have successfully restored a backup using the resultant file so I know it works.
Oh, and I should have added, your "some problems occurred" could very well be totally harmless. Given the syntax of the error you are describing, I presume you are using the perl, non-LVM backup method here. I don't know perl, but as I read the script, it appears to me that the script does a data comparison of the source and destination folders after the rsync, and sends you the "problems" messages if it finds a difference.
The "problem" you may encounter is that, though the script does a pid for existing processes after stopping Zimbra, it doesn't appear to wait after stopping them (the finall kill -9) before launching into rsync. If rsync were to happen to grab a temporary file from the source folder that was in the process of being deleted, but wasn't gone yet, it would go ahead and sync that file to your destination directory, but by the time of the compare, the file would be gone from the source directory, thus creating an exception (the converse problem also happens sometimes, in that rsync makes a list of files to synchronize before copying them, and then by the time it tries to get the file it's gone, resulting in rsync itself returning an error).
You can verify this, or observe other problems, by doing one of two things:
- Run the script live from the command line and watch what happens; or
- Create a literal log of the whole process by adding something like this string to the end of the cron command that fires off your backup:
Anyway, I am guessing that if you would introduce a few seconds (say 10) of sleep time between the end of the killing of processes, and the starting of rsync, this error would go away.
> /temp/zbackup.log 2>&1
How to do this, if in fact my guess is a good one, I leave to people who actually know how to write perl! :D