PDA

View Full Version : snapshot sudo issue



yzenezy
June 9th, 2015, 05:02 PM
Hi,

I'm having trouble getting lvm_snapshot.pl to work.

config:

[[email protected] ~]# grep -v \# /etc/mysql-zrm/mysql-zrm.conf | sed '/^$/d'
compress=1
user="mybackupuser"
password="secret"
mailto="[email protected]"
html-reports=backup-status-info,backup-method-info,backup-retention-info,backup-performance-info,restore-info,backup-app-performance-info
html-report-directory=/var/www/mysql-zrm/reports/
webserver-url=http://garage.motec.com.au/mysql-zrm/
rss-header-location=/etc/mysql-zrm/
[[email protected] ~]# grep -v \# /etc/mysql-zrm/garage/mysql-zrm.conf | sed '/^$/d'
backup-level=0
backup-mode=raw
snapshot-size=100M
snapshot-plugin="/usr/share/mysql-zrm/plugins/lvm-snapshot.pl"
retention-policy=7D
databases=cacti mysql
[[email protected] ~]#


Wed Jun 10 08:24:02 2015: garage:backup:ERROR: Command /usr/share/mysql-zrm/plugins/lvm-snapshot.pl --action get-vm-device-details --directory /var/lib/mysql/. --sname zrmwAJd4pbHJ4 2>/tmp/NPiOsQCF8U returned error
Wed Jun 10 08:24:02 2015: garage:backup:WARNING: Error getting device details for /var/lib/mysql/.
Wed Jun 10 08:24:02 2015: garage:backup:WARNING: Output of command: 'Getting Device Details' is {
sudo: sorry, you must have a tty to run sudo
Failed to find database: /var/lib/mysql/.
}


I tried the visudo changes as per this thread:

https://forums.zmanda.com/showthread.php?1549-LVM-snapshot-failure

So my sudoers file has these entries:

[[email protected] ~]# grep mysql /etc/sudoers
Defaults:%mysql !requiretty
Defaults:mysql !requiretty
mysql ALL=(ALL) NOPASSWD: ALL

But I still get the error
sudo: sorry, you must have a tty to run sudo

What am I missing here?

Kind regards,
Tom