hi ,
in the last days nagios scheduled backup not building tar.gz files as but folders with files ,as result the restore script won't work
good example:
nagiosxi.1462575541.tar.gz(file)
bad example:
nagiosxi.1463698741(folder)
how can i fix this ,so the files get created as a tar.gz files and not folders?
thanks
info from the backup log
05-17-2016 18:59:01 DEBUG: Running scheduled local backup ...
05-17-2016 18:59:01 INFO: Creating a local backup: nagiosxi.1463525941
05-17-2016 18:59:01 INFO: Too many backups! Limit is 21. Removing: nagiosxi.1461711541.tar.gz before proceeding with backup.
05-17-2016 18:59:02 DEBUG: Sending create local backup command to CmdSubsystem
05-18-2016 18:59:01 DEBUG: Running scheduled local backup ...
05-18-2016 18:59:01 INFO: Creating a local backup: nagiosxi.1463612341
05-18-2016 18:59:01 INFO: Too many backups! Limit is 21. Removing: nagiosxi.1461797941.tar.gz before proceeding with backup.
05-18-2016 18:59:02 DEBUG: Sending create local backup command to CmdSubsystem
05-19-2016 18:59:01 DEBUG: Running scheduled local backup ...
05-19-2016 18:59:01 INFO: Creating a local backup: nagiosxi.1463698741
05-19-2016 18:59:01 INFO: Too many backups! Limit is 21. Removing: nagiosxi.1461884341.tar.gz before proceeding with backup.
05-19-2016 18:59:02 DEBUG: Sending create local backup command to CmdSubsystem
05-20-2016 18:59:01 DEBUG: Running scheduled local backup ...
05-20-2016 18:59:01 INFO: Creating a local backup: nagiosxi.1463785141
05-20-2016 18:59:01 DEBUG: Sending create local backup command to CmdSubsystem
05-21-2016 18:59:01 DEBUG: Running scheduled local backup ...
05-21-2016 18:59:01 INFO: Creating a local backup: nagiosxi.1463871541
05-21-2016 18:59:01 DEBUG: Sending create local backup command to CmdSubsystem
05-22-2016 18:59:01 DEBUG: Running scheduled local backup ...
05-22-2016 18:59:01 INFO: Creating a local backup: nagiosxi.1463957941
05-22-2016 18:59:01 DEBUG: Sending create local backup command to CmdSubsystem
05-23-2016 18:59:01 DEBUG: Running scheduled local backup ...
05-23-2016 18:59:01 INFO: Creating a local backup: nagiosxi.1464044341
05-23-2016 18:59:01 DEBUG: Sending create local backup command to CmdSubsystem
05-24-2016 18:59:01 DEBUG: Running scheduled local backup ...
05-24-2016 18:59:01 INFO: Creating a local backup: nagiosxi.1464130741
05-24-2016 18:59:01 DEBUG: Sending create local backup command to CmdSubsystem
05-25-2016 18:59:01 DEBUG: Running scheduled local backup ...
05-25-2016 18:59:01 INFO: Creating a local backup: nagiosxi.1464217141
05-25-2016 18:59:01 DEBUG: Sending create local backup command to CmdSubsystem
05-26-2016 20:59:01 DEBUG: Running scheduled local backup ...
05-26-2016 20:59:01 INFO: Creating a local backup: nagiosxi.1464310741
05-26-2016 20:59:01 INFO: Too many backups! Limit is 14. Removing: nagiosxi.1461970741.tar.gz before proceeding with backup.
05-26-2016 20:59:02 INFO: Too many backups! Limit is 14. Removing: nagiosxi.1462057141.tar.gz before proceeding with backup.
05-26-2016 20:59:03 INFO: Too many backups! Limit is 14. Removing: nagiosxi.1462143541.tar.gz before proceeding with backup.
05-26-2016 20:59:04 INFO: Too many backups! Limit is 14. Removing: nagiosxi.1462229941.tar.gz before proceeding with backup.
05-26-2016 20:59:05 INFO: Too many backups! Limit is 14. Removing: nagiosxi.1462316341.tar.gz before proceeding with backup.
05-26-2016 20:59:06 INFO: Too many backups! Limit is 14. Removing: nagiosxi.1462402741.tar.gz before proceeding with backup.
05-26-2016 20:59:07 INFO: Too many backups! Limit is 14. Removing: nagiosxi.1462489141.tar.gz before proceeding with backup.
05-26-2016 20:59:08 DEBUG: Sending create local backup command to CmdSubsystem
05-27-2016 20:59:01 DEBUG: Running scheduled local backup ...
05-27-2016 20:59:01 INFO: Creating a local backup: nagiosxi.1464397141
05-27-2016 20:59:01 DEBUG: Sending create local backup command to CmdSubsystem
05-28-2016 20:59:01 DEBUG: Running scheduled local backup ...
05-28-2016 20:59:01 INFO: Creating a local backup: nagiosxi.1464483541
05-28-2016 20:59:01 DEBUG: Sending create local backup command to CmdSubsystem
when i run the backup i get this
[root@nagios_xi_prod scripts]# ./backup_xi.sh
Running configuration check...
Stopping nagios:. done.
Starting nagios: done.
Backing up Core Config Manager (NagiosQL)...
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
Backing up Nagios Core...
tar: Removing leading `/' from member names
tar: /usr/local/nagios/var/rw/nagios.qh: socket ignored
tar: /usr/local/nagios/var/ndo.sock: socket ignored
tar: /usr/local/nagios/var: file changed as we read it
tar: /usr/local/nagios/share/perfdata/USNJ-TPS24: file changed as we read it
tar: /usr/local/nagios/share/perfdata/USNJ-TPS16: file changed as we read it
tar: /usr/local/nagios/share/perfdata/USNJ-TPS47: file changed as we read it
tar: /usr/local/nagios/share/perfdata/esxny-c-01.doubleverify.prod: file changed as we read it
tar: /usr/local/nagios/share/perfdata/USNJ-TPS33: file changed as we read it
tar: /usr/local/nagios/share/perfdata/USNJ-TPS44: file changed as we read it
tar: /usr/local/nagios/share/perfdata/AN-LAX-JTPS02: file changed as we read it
tar: /usr/local/nagios/share/perfdata/USNJ-BSWeb08: file changed as we read it
tar: /usr/local/nagios/share/perfdata/Dviscsi.doubleverify.prod/_HOST_.xml.25365: File removed before we read it
tar: /usr/local/nagios/share/perfdata/Dviscsi.doubleverify.prod: file changed as we read it
tar: /usr/local/nagios/share/perfdata/USNJ-TPS32: file changed as we read it
tar: /usr/local/nagios/share/perfdata/VT13: file changed as we read it
tar: /usr/local/nagios/share/perfdata/USNJ-TPS35: file changed as we read it
tar: /usr/local/nagios/share/perfdata/esxny-c-04.doubleverify.prod: file changed as we read it
Backing up Nagios XI...
tar: Removing leading `/' from member names
Backing up MRTG...
tar: Removing leading `/' from member names
Backing up NRDP...
tar: Removing leading `/' from member names
Backing up Nagvis...
tar: Removing leading `/' from member names
Backing up MySQL databases...
mysqldump: Got error: 130: Incorrect file format 'tbl_logbook' when using LOCK TABLES
Error backing up MySQL database 'nagiosql' - check the password in this script!
XI scheduled backup creating folder not tar.gz files
XI scheduled backup creating folder not tar.gz files
Last edited by dwhitfield on Mon Feb 27, 2017 10:43 am, edited 1 time in total.
Reason: marking with green check mark
Reason: marking with green check mark
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: XI scheduled backup creating folder not tar.gz files
The source of the problem is that the database has a corruption.
Because of this the backup script fails and never completes
Hence the .tar.gz file is not completed and the directory is not deleted.
Can you please follow this article to run the database repair process:
https://support.nagios.com/kb/article.php?id=24
This may take a while to complete. Once it has, please scroll back up through the history to make sure there were not any database errors (you may see an ndo2db error when stopping the service but this is ok).
Once this is done, re-run the manual backup to confirm it is completing OK.
You will need to manually delete those folders as the backup routine will not clean them up.
Because of this the backup script fails and never completes
Hence the .tar.gz file is not completed and the directory is not deleted.
Can you please follow this article to run the database repair process:
https://support.nagios.com/kb/article.php?id=24
This may take a while to complete. Once it has, please scroll back up through the history to make sure there were not any database errors (you may see an ndo2db error when stopping the service but this is ok).
Once this is done, re-run the manual backup to confirm it is completing OK.
You will need to manually delete those folders as the backup routine will not clean them up.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: XI scheduled backup creating folder not tar.gz files
hi thanks for the response
run the command
/usr/local/nagiosxi/scripts/repair_databases.sh
but still same error when doing manual backup
[root@nagios_xi_prod scripts]# ./backup_xi.sh
Running configuration check...
Stopping nagios:. done.
Starting nagios: done.
Backing up Core Config Manager (NagiosQL)...
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
Backing up Nagios Core...
tar: Removing leading `/' from member names
tar: /usr/local/nagios/var/rw/nagios.qh: socket ignored
tar: /usr/local/nagios/var/ndo.sock: socket ignored
tar: /usr/local/nagios/var: file changed as we read it
tar: /usr/local/nagios/share/perfdata/USNJ-TPS16: file changed as we read it
tar: /usr/local/nagios/share/perfdata/WC-jTPS-RTB-Turn01: file changed as we read it
tar: /usr/local/nagios/share/perfdata/nycp-dv-asld02.doubleverify.prod: file changed as we read it
tar: /usr/local/nagios/share/perfdata/AppNexus-JTPS03: file changed as we read it
tar: /usr/local/nagios/share/perfdata/USNJ-TPS17: file changed as we read it
tar: /usr/local/nagios/share/perfdata/USNJ-TPS48: file changed as we read it
tar: /usr/local/nagios/share/perfdata/jTPS-RTB-Yahoo04: file changed as we read it
tar: /usr/local/nagios/share/perfdata/USNJ-BSWeb08: file changed as we read it
tar: /usr/local/nagios/share/perfdata/USNJ-TPS15: file changed as we read it
tar: /usr/local/nagios/share/perfdata/VT_Vertica_result_sets_extractor: file changed as we read it
tar: /usr/local/nagios/share/perfdata/USNJ-TPS31: file changed as we read it
tar: /usr/local/nagios/share/perfdata/AN-LAX-JTPS03: file changed as we read it
tar: /usr/local/nagios/share/perfdata/USNJ-TPS10: file changed as we read it
tar: /usr/local/nagios/share/perfdata/USNJ-TPS14: file changed as we read it
Backing up Nagios XI...
tar: Removing leading `/' from member names
Backing up MRTG...
tar: Removing leading `/' from member names
Backing up NRDP...
tar: Removing leading `/' from member names
Backing up Nagvis...
tar: Removing leading `/' from member names
Backing up MySQL databases...
mysqldump: Got error: 130: Incorrect file format 'tbl_logbook' when using LOCK TABLES
Error backing up MySQL database 'nagiosql' - check the password in this script!
this is the mysql log
[root@nagios_xi_prod scripts]# tail /var/log/mysqld.log
160530 3:26:47 [Note] /usr/libexec/mysqld: Shutdown complete
160530 03:26:47 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
160530 03:26:49 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
160530 3:26:49 InnoDB: Initializing buffer pool, size = 8.0M
160530 3:26:49 InnoDB: Completed initialization of buffer pool
160530 3:26:49 InnoDB: Started; log sequence number 0 44273
160530 3:26:49 [Note] Event Scheduler: Loaded 0 events
160530 3:26:49 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.73' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
run the command
/usr/local/nagiosxi/scripts/repair_databases.sh
but still same error when doing manual backup
[root@nagios_xi_prod scripts]# ./backup_xi.sh
Running configuration check...
Stopping nagios:. done.
Starting nagios: done.
Backing up Core Config Manager (NagiosQL)...
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
Backing up Nagios Core...
tar: Removing leading `/' from member names
tar: /usr/local/nagios/var/rw/nagios.qh: socket ignored
tar: /usr/local/nagios/var/ndo.sock: socket ignored
tar: /usr/local/nagios/var: file changed as we read it
tar: /usr/local/nagios/share/perfdata/USNJ-TPS16: file changed as we read it
tar: /usr/local/nagios/share/perfdata/WC-jTPS-RTB-Turn01: file changed as we read it
tar: /usr/local/nagios/share/perfdata/nycp-dv-asld02.doubleverify.prod: file changed as we read it
tar: /usr/local/nagios/share/perfdata/AppNexus-JTPS03: file changed as we read it
tar: /usr/local/nagios/share/perfdata/USNJ-TPS17: file changed as we read it
tar: /usr/local/nagios/share/perfdata/USNJ-TPS48: file changed as we read it
tar: /usr/local/nagios/share/perfdata/jTPS-RTB-Yahoo04: file changed as we read it
tar: /usr/local/nagios/share/perfdata/USNJ-BSWeb08: file changed as we read it
tar: /usr/local/nagios/share/perfdata/USNJ-TPS15: file changed as we read it
tar: /usr/local/nagios/share/perfdata/VT_Vertica_result_sets_extractor: file changed as we read it
tar: /usr/local/nagios/share/perfdata/USNJ-TPS31: file changed as we read it
tar: /usr/local/nagios/share/perfdata/AN-LAX-JTPS03: file changed as we read it
tar: /usr/local/nagios/share/perfdata/USNJ-TPS10: file changed as we read it
tar: /usr/local/nagios/share/perfdata/USNJ-TPS14: file changed as we read it
Backing up Nagios XI...
tar: Removing leading `/' from member names
Backing up MRTG...
tar: Removing leading `/' from member names
Backing up NRDP...
tar: Removing leading `/' from member names
Backing up Nagvis...
tar: Removing leading `/' from member names
Backing up MySQL databases...
mysqldump: Got error: 130: Incorrect file format 'tbl_logbook' when using LOCK TABLES
Error backing up MySQL database 'nagiosql' - check the password in this script!
this is the mysql log
[root@nagios_xi_prod scripts]# tail /var/log/mysqld.log
160530 3:26:47 [Note] /usr/libexec/mysqld: Shutdown complete
160530 03:26:47 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
160530 03:26:49 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
160530 3:26:49 InnoDB: Initializing buffer pool, size = 8.0M
160530 3:26:49 InnoDB: Completed initialization of buffer pool
160530 3:26:49 InnoDB: Started; log sequence number 0 44273
160530 3:26:49 [Note] Event Scheduler: Loaded 0 events
160530 3:26:49 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.73' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: XI scheduled backup creating folder not tar.gz files
There is still an issue with the database.
Can you please run the repair script again and post the entire output that the repair script generates.
Can you please run the repair script again and post the entire output that the repair script generates.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: XI scheduled backup creating folder not tar.gz files
fixed the bad table using other tools from the net ,backup now work well
thanks for pointing me to the write direction
thanks for pointing me to the write direction
Re: XI scheduled backup creating folder not tar.gz files
Is it alright if we mark this issue as resolved and lock the thread?
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: XI scheduled backup creating folder not tar.gz files
yes ,cant find how to close it my self
thanks for the help
thanks for the help
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: XI scheduled backup creating folder not tar.gz files
I don't think can.
I will lock.