We started getting JSS database backup errors a couple days ago. The automatic overnight backups seem to run without issue (backup files are created and end up where they are supposed to) but then the run throws an error and sends a "failed" email to our casper admins (in place of the usual successful backup email notice) -- all that message says is: "There was an error backing up your JSS Database. Please see the server for more information." (Weirdly, walking to the server closet and laying eyes on the server doesn't seem to help!)
Running manually from the app has the same results. Running manually from terminal has the same results.
Unfortunately the backupDatabase.log doesn't give us much to work with...
Saving database backup to /Volumes/path/to/backups/2013-10-17_09-00-52.sql.gz... Sending backup notification to https://casper.lives.here:8443/... Error: /Volumes/RGM Users/casper/backups/2013-10-17_09-00-52.sql.gz (Invalid argument) Error: Encountered an error while attempting to backup the JSS database
Nothing's changed with the destination where the backup is being saved, and as mentioned above, the backup DOES get saved there without any issues. I guess it's just not getting some confirmation bit back after the save and that's generating the error... Anyone else run into this before? Not finding any similar hits here or elsewhere on the web. Not sure what to fiddle with next.
For comparison, here's a successful backup in the log:
[2013-10-15 01:00:40] Saving database backup to /Volumes/path/to/backups/auto-2013-10-15_01-00-00.sql.gz... [2013-10-15 01:02:30] Sending backup notification to https://casper.lives.here:8443/... [2013-10-15 01:02:31] Deleting backups older than 7 days... [2013-10-15 01:02:31] Deleting old backup: /Volumes/path/to/backups/auto-2013-10-08_01-00-01.sql.gz [2013-10-15 01:02:31] Backup completed in 2 minutes 30 seconds
And here's the error:
[2013-10-17 01:00:37] Saving database backup to /Volumes/path/to/backups/auto-2013-10-17_01-00-00.sql.gz... [2013-10-17 01:10:02] Sending backup notification to https://casper.lives.here:8443/... [2013-10-17 01:10:03] Invalid argument [2013-10-17 01:10:03] Encountered an error while attempting to backup the JSS database
Aha, the issue was actually with deletion of older backups from the backup destination. Something had gone awry with permissions and once I fixed that, the error went away.
Probably the backupDatabase.log should more accurately report "Encountered an error while attempting to delete backups older than X days". That would have saved me a bit of time today.
I had similar problems with creating backups. Make sure you are not using MySql ver.5.6.14. it seems that is not fully supported with Casper 9.12. I downgraded to 5.5.34 and my backup problems went away. Server is back to normal.