chrplunk wrote:
> We recently ran out of / space on our Zenoss Production server, so we moved
> the events db to a REMOTE Ubuntu MySQL box successfully.
> Now the problem is that zenoss-backup does not run any more.
> /usr/local/zenoss/Products/ZenUtils/ZenBackup.py.
> I am no python master, but it's fairly simple to follow. I am not sure why
> it's failing. Is this perhaps a known issue?
>
Yeah, we also noticed this; It seems the backup/restore scripts does not
actually support having a remote database. It does not look up this information
(the hostname) from the configuration, nor does it have a command line switch.
We made some ugly patches to our scripts, so that we at least could supply this
on the commandline. Since we didn't really bother digging down into ZenOss, it
does not look up the dbhost variable itself here either. You use the --dbhost
argument on the commandline.
ZenBackupBase.py:
Code:
32c32,33
< ('dbpass', '', 'password'))
---
> ('dbpass', '', 'password'),
> ('dbhost', None, None))
76a78,81
> def getHostArg(self):
> if self.options.dbhost == None:
> return ''
> return '-h"%s"' % self.options.dbhost
ZenBackup.py:
Code:
114a115
> self.parser.add_option('--dbhost', dest='dbhost', default=None,
> help='blabla'),
193c194
< cmd = 'mysqldump -u"%s" %s --routines %s > %s' % (
---
> cmd = 'mysqldump -u"%s" %s %s --routines %s > %s' % (
195a197
> self.getHostArg(),
ZenRestore.py:
Code:
52a53
> self.parser.add_option('--dbhost', dest='dbhost', default=None,
> help='tsjippen'),
97c98
< cmd = 'echo "%s" | mysql -u"%s" %s' % (
---
> cmd = 'echo "%s" | mysql -u"%s" %s %s' % (
100c101,102
< self.getPassArg())
---
> self.getPassArg(),
> self.getHostArg())
Hopefully they will add support for this so we don't have to keep patching.
-------------------- m2f --------------------
Read this topic online here:
http://community.zenoss.com/forums/viewtopic.php?p=22994#22994
-------------------- m2f --------------------
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users