Page 1 of 1

Scheduled Backups

Posted: Mon Dec 31, 2018 7:18 am
by CJIndustries
I noticed that once I upgraded to 5.5.8, the scheduled SSH backups are not working. Please advise. Thank you.

Re: Scheduled Backups

Posted: Wed Jan 02, 2019 11:59 am
by ssax
The first thing to check is for disk space issues, please send the output of these commands:

Code: Select all

df -h
df -i
Then see if you have any crashed tables, post the output of this command:

Code: Select all

echo "SELECT table_name AS 'Table', round(((data_length + index_length) / 1024 / 1024), 2) 'Size in MB' FROM information_schema.TABLES WHERE table_schema IN ('nagios', 'nagiosql', 'nagiosxi');" | mysql -uroot -pnagiosxi --table
Then check the contents of this file to see if you see any errors:

Code: Select all

/usr/local/nagiosxi/var/components/scheduledbackups.log
Finally, do regular local backups work properly? Please login as root an run these commands and post the full output if it fails:

Code: Select all

cd /usr/local/nagiosxi/scripts
./backup_xi.sh
Additionally, please post a screenshot of your Scheduled backup SSH settings from Admin > Scheduled Backups.

What is the output of this command as well:

Code: Select all

ls -l /store/backups/nagiosxi

Re: Scheduled Backups

Posted: Wed Jan 02, 2019 12:30 pm
by CJIndustries
Attached output of requested commands.

Re: Scheduled Backups

Posted: Wed Jan 02, 2019 12:34 pm
by ssax
You have a crashed DB table, that's likely why it's failing:

Code: Select all

| nagios_commenthistory                      |       NULL |
mysqldump: Got error: 144: Table './nagios/nagios_commenthistory' is marked as crashed and last (automatic?) repair failed when using LOCK TABLES
Please follow this guide to repair your DB tables:

https://support.nagios.com/kb/article/n ... es-24.html

Then try the backup again and it'll likely work.

Re: Scheduled Backups

Posted: Wed Jan 02, 2019 1:01 pm
by CJIndustries
Tested both local and scheduled. Looks like they are working fine now. Thanks.

Re: Scheduled Backups

Posted: Wed Jan 02, 2019 1:59 pm
by npolovenko
@CJIndustries, I will be closing this thread as resolved. However, feel free to open a new one if something else comes up.