Backup cannot be rotate
-
cyberportnoc
- Posts: 66
- Joined: Tue Nov 24, 2015 1:14 am
Backup cannot be rotate
Dear support,
We found that our backup cannot be rotate successfully.
when i test the permission, it response "The directory is likely not writeable by user 'nagios' or group 'nagios' - check permission"
But i check the folder permission already correct
[noc@icnagios01 nagios]$ ll
total 32
drwxr-xr-x 29 nagios nagios 4096 May 12 09:43 backup
[noc@icnagios01 nagios]$ pwd
/usr/local/nagios
Thanks,
Kelvin
We found that our backup cannot be rotate successfully.
when i test the permission, it response "The directory is likely not writeable by user 'nagios' or group 'nagios' - check permission"
But i check the folder permission already correct
[noc@icnagios01 nagios]$ ll
total 32
drwxr-xr-x 29 nagios nagios 4096 May 12 09:43 backup
[noc@icnagios01 nagios]$ pwd
/usr/local/nagios
Thanks,
Kelvin
Re: Backup cannot be rotate
Are you trying to save your backups in the "/usr/local/nagios"? This is not going to work. The backup script actually backs up this directory, so if you try to store the backup in the same folder, you will run into a loop... Backups are stored by default in "/store/backups/nagiosxi/". You can use an alternative location, but not "/usr/local/nagios".
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
cyberportnoc
- Posts: 66
- Joined: Tue Nov 24, 2015 1:14 am
Re: Backup cannot be rotate
Dear lmiltchev,
Even i changed the backup location to "store/backups/nagiosxi"
[root@icnagios01 nagiosxi]# pwd
/store/backups/nagiosxi
[root@icnagios01 nagiosxi]# ls /store/backups
mysql nagiosxi postgresql
[root@icnagios01 nagiosxi]# ll /store/backups
total 12
drwxr-xr-x 5 root root 4096 Dec 9 07:00 mysql
drwxr-xr-x 25 nagios nagios 4096 May 13 10:07 nagiosxi
drwxr-xr-x 5 root root 4096 Dec 9 08:00 postgresql
[root@icnagios01 nagiosxi]#
After check permission, it also response me "The directory is likely not writeable by user 'nagios' or group 'nagios' - check permissions."
Please help to check.
Thanks,
Kelvin
Even i changed the backup location to "store/backups/nagiosxi"
[root@icnagios01 nagiosxi]# pwd
/store/backups/nagiosxi
[root@icnagios01 nagiosxi]# ls /store/backups
mysql nagiosxi postgresql
[root@icnagios01 nagiosxi]# ll /store/backups
total 12
drwxr-xr-x 5 root root 4096 Dec 9 07:00 mysql
drwxr-xr-x 25 nagios nagios 4096 May 13 10:07 nagiosxi
drwxr-xr-x 5 root root 4096 Dec 9 08:00 postgresql
[root@icnagios01 nagiosxi]#
After check permission, it also response me "The directory is likely not writeable by user 'nagios' or group 'nagios' - check permissions."
Please help to check.
Thanks,
Kelvin
Re: Backup cannot be rotate
Go to Admin->System Backups->Scheduled Backups->Local, and show us a screenshot of this page. Also, run the following commands, and show the output:
Code: Select all
ls -ld /store/backups
ls -l /store/backupsBe sure to check out our Knowledgebase for helpful articles and solutions!
-
cyberportnoc
- Posts: 66
- Joined: Tue Nov 24, 2015 1:14 am
Re: Backup cannot be rotate
Dear lmiltchev,
Please find attached file for your informaiton.
Below are the result of command.
[root@icnagios01 ~]# ls -ld /store/backups
drwxr-xr-x 5 root root 4096 Feb 24 2015 /store/backups
[root@icnagios01 ~]# ls -l /store/backups
total 12
drwxr-xr-x 5 root root 4096 Dec 9 07:00 mysql
drwxr-xr-x 26 nagios nagios 4096 May 15 00:00 nagiosxi
drwxr-xr-x 5 root root 4096 Dec 9 08:00 postgresql
Thanks,
Kelvin
Please find attached file for your informaiton.
Below are the result of command.
[root@icnagios01 ~]# ls -ld /store/backups
drwxr-xr-x 5 root root 4096 Feb 24 2015 /store/backups
[root@icnagios01 ~]# ls -l /store/backups
total 12
drwxr-xr-x 5 root root 4096 Dec 9 07:00 mysql
drwxr-xr-x 26 nagios nagios 4096 May 15 00:00 nagiosxi
drwxr-xr-x 5 root root 4096 Dec 9 08:00 postgresql
Thanks,
Kelvin
You do not have the required permissions to view the files attached to this post.
Re: Backup cannot be rotate
The group permissions for the /store/backups/nagiosxi/ folder are not correct. Run the following command to change the permissions.
Then try running the backup and see if that resolved the issue.
Code: Select all
chmod g+rwx /store/backups/nagiosxi/Be sure to check out our Knowledgebase for helpful articles and solutions!
-
cyberportnoc
- Posts: 66
- Joined: Tue Nov 24, 2015 1:14 am
Re: Backup cannot be rotate
Dear tgriep,
The backup still not able to rotate:
============================
[root@icnagios01 nagiosxi]# pwd
/store/backups/nagiosxi
[root@icnagios01 nagiosxi]# ll
total 100
drwx------ 2 root root 16384 Jun 9 2015 lost+found
drwxr-xr-x 2 nagios users 4096 Apr 27 17:46 nagiosxi.1448985602
drwxr-xr-x 2 nagios users 4096 Dec 31 10:38 nagiosxi.1451527622
drwxr-xr-x 2 nagios users 4096 May 5 01:55 nagiosxi.1451527682
drwxr-xr-x 2 nagios users 4096 Dec 31 10:38 nagiosxi.1451528222
drwxr-xr-x 2 nagios users 4096 Dec 31 10:38 nagiosxi.1451528403
drwxr-xr-x 2 nagios users 4096 Dec 31 10:38 nagiosxi.1451528462
drwxr-xr-x 2 nagios users 4096 Apr 27 17:47 nagiosxi.1451528525
drwxr-xr-x 2 nagios users 4096 May 5 01:53 nagiosxi.1451528586
drwxr-xr-x 2 nagios users 4096 Dec 31 10:38 nagiosxi.1451528645
drwxr-xr-x 2 nagios users 4096 Dec 31 10:38 nagiosxi.1451528707
drwxr-xr-x 2 nagios users 4096 Jan 1 00:00 nagiosxi.1451577602
drwxr-xr-x 2 nagios users 4096 Jan 2 00:00 nagiosxi.1451664002
drwxr-xr-x 2 nagios users 4096 Jan 3 00:00 nagiosxi.1451750402
drwxr-xr-x 2 nagios users 4096 Apr 28 00:17 nagiosxi.1461772802
drwxr-xr-x 2 nagios users 4096 Apr 29 00:00 nagiosxi.1461859202
drwxr-xr-x 2 nagios users 4096 Apr 30 00:00 nagiosxi.1461945601
drwxr-xr-x 2 nagios users 4096 May 3 00:32 nagiosxi.1462204802
drwxr-xr-x 2 nagios users 4096 May 4 00:00 nagiosxi.1462291201
drwxr-xr-x 2 nagios users 4096 May 8 00:20 nagiosxi.1462636801
drwxr-xr-x 4 nagios users 4096 May 15 00:21 nagiosxi.1463241602
drwxr-xr-x 4 nagios users 4096 May 18 00:00 nagiosxi.1463500802
============================
Please advise.
Thanks,
Kelvin
The backup still not able to rotate:
============================
[root@icnagios01 nagiosxi]# pwd
/store/backups/nagiosxi
[root@icnagios01 nagiosxi]# ll
total 100
drwx------ 2 root root 16384 Jun 9 2015 lost+found
drwxr-xr-x 2 nagios users 4096 Apr 27 17:46 nagiosxi.1448985602
drwxr-xr-x 2 nagios users 4096 Dec 31 10:38 nagiosxi.1451527622
drwxr-xr-x 2 nagios users 4096 May 5 01:55 nagiosxi.1451527682
drwxr-xr-x 2 nagios users 4096 Dec 31 10:38 nagiosxi.1451528222
drwxr-xr-x 2 nagios users 4096 Dec 31 10:38 nagiosxi.1451528403
drwxr-xr-x 2 nagios users 4096 Dec 31 10:38 nagiosxi.1451528462
drwxr-xr-x 2 nagios users 4096 Apr 27 17:47 nagiosxi.1451528525
drwxr-xr-x 2 nagios users 4096 May 5 01:53 nagiosxi.1451528586
drwxr-xr-x 2 nagios users 4096 Dec 31 10:38 nagiosxi.1451528645
drwxr-xr-x 2 nagios users 4096 Dec 31 10:38 nagiosxi.1451528707
drwxr-xr-x 2 nagios users 4096 Jan 1 00:00 nagiosxi.1451577602
drwxr-xr-x 2 nagios users 4096 Jan 2 00:00 nagiosxi.1451664002
drwxr-xr-x 2 nagios users 4096 Jan 3 00:00 nagiosxi.1451750402
drwxr-xr-x 2 nagios users 4096 Apr 28 00:17 nagiosxi.1461772802
drwxr-xr-x 2 nagios users 4096 Apr 29 00:00 nagiosxi.1461859202
drwxr-xr-x 2 nagios users 4096 Apr 30 00:00 nagiosxi.1461945601
drwxr-xr-x 2 nagios users 4096 May 3 00:32 nagiosxi.1462204802
drwxr-xr-x 2 nagios users 4096 May 4 00:00 nagiosxi.1462291201
drwxr-xr-x 2 nagios users 4096 May 8 00:20 nagiosxi.1462636801
drwxr-xr-x 4 nagios users 4096 May 15 00:21 nagiosxi.1463241602
drwxr-xr-x 4 nagios users 4096 May 18 00:00 nagiosxi.1463500802
============================
Please advise.
Thanks,
Kelvin
Re: Backup cannot be rotate
Please run the backup manually and see if it fails, you may have crashed tables, the files should be tar.gz files so it looks like the backups never completed.
Run those commands and post any errors.
Thank you
Code: Select all
cd /usr/local/nagiosxi/scripts
./backup_xi.shThank you
-
cyberportnoc
- Posts: 66
- Joined: Tue Nov 24, 2015 1:14 am
Re: Backup cannot be rotate
Dear ssax,
Below are the result:
[root@icnagios01 scripts]# ./backup_xi.sh
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
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 MySQL databases...
mysqldump: Got error: 144: Table './nagiosql/tbl_command' is marked as crashed and last (automatic?) repair failed when using LOCK TABLES
Error backing up MySQL database 'nagiosql' - check the password in this script!
Please advise.
Thanks,
Kelvin
Below are the result:
[root@icnagios01 scripts]# ./backup_xi.sh
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
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 MySQL databases...
mysqldump: Got error: 144: Table './nagiosql/tbl_command' is marked as crashed and last (automatic?) repair failed when using LOCK TABLES
Error backing up MySQL database 'nagiosql' - check the password in this script!
Please advise.
Thanks,
Kelvin
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Backup cannot be rotate
Can you please follow this article to run the database repair process as I believe you may have some database issues:
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 you've done this, please run the manual backup again.
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 you've done this, please run the manual backup again.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.