PDA

View Full Version : Problems with 1.2.1 on Centos-5



danypd69
September 25th, 2007, 11:42 PM
Hello,
I'm currently using mysql-zrm 1.5.1 on my Centos5 server and it runs well.

Yesterday I tried to upgrade to the latest (1.2.1) version.
Running the backup manually with mysql-zrm-scheduler --now --backup-set dailyrun --backup-level 0 went fine so I installed the cronjob.

The nightly backup failed and filled the log with these errors


Wed Sep 26 03:00:03 2007: BackupSet1:backup:WARNING: Binary logging is off.
Wed Sep 26 03:00:03 2007: BackupSet1:backup:INFO: backup-set=BackupSet1
Wed Sep 26 03:00:03 2007: BackupSet1:backup:INFO: backup-date=20070926030003
Wed Sep 26 03:00:03 2007: BackupSet1:backup:INFO: host=localhost
Wed Sep 26 03:00:03 2007: BackupSet1:backup:INFO: backup-date-epoch=1190768403
Wed Sep 26 03:00:03 2007: BackupSet1:backup:INFO: retention-policy=2D
Wed Sep 26 03:00:03 2007: BackupSet1:backup:INFO: mysql-zrm-version=ZRM for MySQL Community Edition - version 1.2.1
Wed Sep 26 03:00:03 2007: BackupSet1:backup:INFO: mysql-version=5.0.22-log
Wed Sep 26 03:00:03 2007: BackupSet1:backup:INFO: backup-directory=/backup/mysql/BackupSet1/20070926030003
Wed Sep 26 03:00:04 2007: BackupSet1:backup:INFO: backup-level=0
Wed Sep 26 03:00:04 2007: BackupSet1:backup:ERROR: Command returned error
Wed Sep 26 03:00:04 2007: BackupSet1:backup:ERROR: Output of command: '/usr/share/mysql-zrm/plugins/lvm-snapshot.pl --action get-vm-device-details --directory "/var/lib/mysql//DB_Test" --sname zrm7Nk6WL 2>/tmp/rLxt4Q7Rhv' is {
sudo: sorry, you must have a tty to run sudo
Failed to find database: /var/lib/mysql//DB_Test
}
Wed Sep 26 03:00:04 2007: BackupSet1:backup:WARNING: Error getting device details for "/var/lib/mysql//DB_Test"
Wed Sep 26 03:00:04 2007: BackupSet1:backup:WARNING: Could not read file /tmp/rLxt4Q7Rhv


The configuration file is the following



backup-mode=raw
lvm-snapshot=2G
destination=/backup/mysql
retention-policy=2D
all-databases=1
user="root"
password="mypassword"
mailto="daniele@libertyline.com"


and the crontab entry is 0 3 * * * /usr/bin/zrm-pre-scheduler --action backup --backup-set BackupSet1 --interval daily

On another server with CentOS 4.5 everything works fine with the latest version.

Any ideas on what could be wrong ?

Sachin
September 26th, 2007, 12:40 AM
With which user you were running mysql-zrm with?

If it was 'mysql' then try the following -

Quick solution is to comment out following after running visudo

#Default requiretty
---------


Also you should have following things in your /etc/sudoers file if you intend to run as mysql.

mysql <FQDN of zrm server> = NOPASSWD:/bin/mount, NOPASSWD:/bin/umount, NOPASSWD:/bin/df, NOPASSWD:/sbin/lvdisplay, NOPASSWD:/sbin/lvcreate, NOPASSWD:/sbin/lvremove


-sachin

danypd69
September 26th, 2007, 01:14 AM
With which user you were running mysql-zrm with?

If it was 'mysql' then try the following -

Quick solution is to comment out following after running visudo

#Default requiretty
---------


The backup is run as root.

Commenting the 'Default requiretty' worked.

Thanks a lot

Daniele