Not sure if anyone posted about this before, but I am trying to automate a test server build and do that via a scheduled backups / restore. I would like to disable via script the scheduled backups on the test server after the restore and trying to see if there is a way to do it besides trying to manipulate the db table xi_options containing this:
| 106 | scheduled_ftp_backups | a:15:{s:6:"active";i:1;s:4:"freq";s:5:"daily";s:3:"day";s:1:"0";s:5:"hours";s:1:"00";s:4:"mins";s:1:"1";s:6:"server";s:11:"1.1.1.1";s:4:"port";s:2:"21";s:8:"username";s:6:"xxxxxx";s:8:"password";s:80:"xxxxxx";s:3:"dir";s:24:"/xxx/xxx/";s:7:"passive";i:0;s:6:"secure";i:0;s:5:"limit";s:1:"1";s:7:"lastrun";s:10:"111111111111";s:7:"nextrun";i:11111111111;}
I know I could grab the value and change the 1 to 0 after the active variable, keeping the rest of the options but is there any other way via a Nagios command or script I have missed that already exists?
Disable scheduled backups via command line for test server
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Disable scheduled backups via command line for test serv
Unfortunately at this time there isn't a scripted way to trigger them on/off other that what you already have noted above.fullsail wrote:Not sure if anyone posted about this before, but I am trying to automate a test server build and do that via a scheduled backups / restore. I would like to disable via script the scheduled backups on the test server after the restore and trying to see if there is a way to do it besides trying to manipulate the db table xi_options containing this:
| 106 | scheduled_ftp_backups | a:15:{s:6:"active";i:1;s:4:"freq";s:5:"daily";s:3:"day";s:1:"0";s:5:"hours";s:1:"00";s:4:"mins";s:1:"1";s:6:"server";s:11:"1.1.1.1";s:4:"port";s:2:"21";s:8:"username";s:6:"xxxxxx";s:8:"password";s:80:"xxxxxx";s:3:"dir";s:24:"/xxx/xxx/";s:7:"passive";i:0;s:6:"secure";i:0;s:5:"limit";s:1:"1";s:7:"lastrun";s:10:"111111111111";s:7:"nextrun";i:11111111111;}
I know I could grab the value and change the 1 to 0 after the active variable, keeping the rest of the options but is there any other way via a Nagios command or script I have missed that already exists?