PDA

View Full Version : Regarding storing the backup files



Vishu
May 29th, 2009, 09:05 PM
Hai all ,

I have one question regarding storing the backup files.

Right now my backup files are storing in the ZRM server which is of 80GB HDD.
Is there any possibility of taking the backup and storing the backup files in another server rather than in ZRM server. In general the ZRM server should perform backup operation but must store the backup files in another server.
Is there any such option in ZRM if so pls help us.

Thanks in advance.

paddy
June 2nd, 2009, 03:23 PM
Hai all ,

I have one question regarding storing the backup files.

Right now my backup files are storing in the ZRM server which is of 80GB HDD.
Is there any possibility of taking the backup and storing the backup files in another server rather than in ZRM server. In general the ZRM server should perform backup operation but must store the backup files in another server.
Is there any such option in ZRM if so pls help us.

Thanks in advance.


You can store the backups in a NFS or CIFS mounted directory. Will this work?

Paddy

psyferre
January 26th, 2010, 04:52 AM
I have tried specifying a cifs mounted directory as my backup location, but the backup always fails while trying to copy the snapshot. The directory structure for the backup and an "index" file is created, but the snapshot cannot copy. If I revert to the default destination directory, the backup succeeds with no problems. Can anyone help? I'm running ZRM 2.1.1 on Ubuntu 9.1.

Here is a copy of the verbose output:


dailyrun:backup:INFO: START OF BACKUP
dailyrun:backup:INFO: PHASE START: Initialization
dailyrun:backup:WARNING: The lvm-snapshot option is deprecated. Use snapshot-size instead
dailyrun:backup:INFO: Mail address: mike@domain.net is ok
dailyrun:backup:INFO: ZRM Temporary configuration file = /etc/mysql-zrm/dailyrun/tmpOtmS4.conf
dailyrun:backup:INFO: {
dailyrun:backup:INFO: quiet=0
dailyrun:backup:INFO: verbose=1
dailyrun:backup:INFO: retention-policy=1W
dailyrun:backup:INFO: backup-level=0
dailyrun:backup:INFO: lvm-snapshot=2G
dailyrun:backup:INFO: mailto=mike@domain.net
dailyrun:backup:INFO: destination=/network/nas01/shares/replica/Backup/mydbDB
dailyrun:backup:INFO: snapshot-size=2G
dailyrun:backup:INFO: password=******
dailyrun:backup:INFO: backup-mode=raw
dailyrun:backup:INFO: snapshot-plugin=/usr/share/mysql-zrm/plugins/lvm-snapshot.pl
dailyrun:backup:INFO: backup-type=regular
dailyrun:backup:INFO: compress=
dailyrun:backup:INFO: user=root
dailyrun:backup:INFO: }
dailyrun:backup:INFO: Getting mysql variables
dailyrun:backup:INFO: mysqladmin --user="root" --password="*****" variables
dailyrun:backup:INFO: datadir is /var/lib/mysql/
dailyrun:backup:INFO: mysql_version is 5.1.37-1ubuntu5
dailyrun:backup:WARNING: Binary logging is off.
dailyrun:backup:INFO: InnoDB data file are /var/lib/mysql/ibdata1
dailyrun:backup:INFO: InnoDB log dir is /var/lib/mysql/.
dailyrun:backup:INFO: backup set being used is dailyrun
dailyrun:backup:INFO: backup-set=dailyrun
dailyrun:backup:INFO: backup-date=20100126084352
dailyrun:backup:INFO: mysql-server-os=Linux/Unix
dailyrun:backup:INFO: backup-type=regular
dailyrun:backup:INFO: host=localhost
dailyrun:backup:INFO: backup-date-epoch=1264513432
dailyrun:backup:INFO: retention-policy=1W
dailyrun:backup:INFO: mysql-zrm-version=ZRM for MySQL Community Edition - version 2.1.1
dailyrun:backup:INFO: mysql-version=5.1.37-1ubuntu5
dailyrun:backup:INFO: backup-directory=/network/nas01/shares/replica/Backup/mydbDB/dailyrun/20100126084352
dailyrun:backup:INFO: backup-level=0
dailyrun:backup:INFO: backup-mode=raw
dailyrun:backup:INFO: PHASE END: Initialization
dailyrun:backup:INFO: PHASE START: Running pre backup plugin
dailyrun:backup:INFO: Executing pre-backup-plugin
dailyrun:backup:INFO: PHASE END: Running pre backup plugin
dailyrun:backup:INFO: PHASE START: Flushing logs
dailyrun:backup:INFO: Flushing the logs
dailyrun:backup:INFO: mysqladmin --user="root" --password="*****" flush-logs
dailyrun:backup:INFO: Getting master logname using command mysql --user="root" --password="*****" -e "show master status"
dailyrun:backup:INFO: PHASE END: Flushing logs
dailyrun:backup:INFO: Getting list of Databases
dailyrun:backup:INFO: mysql --user="root" --password="*****" -e "show databases;"
dailyrun:backup:INFO: PHASE START: Creating snapshot based backup
dailyrun:backup:INFO: innodb on lvm = 0
dailyrun:backup:INFO: getting device details using command /usr/share/mysql-zrm/plugins/lvm-snapshot.pl --action get-vm-device-details --directory /var/lib/mysql/. --sname zrm6HmDg7bC6o 2>/tmp/hAp1pah4M9
dailyrun:backup:INFO: getting device details using command /usr/share/mysql-zrm/plugins/lvm-snapshot.pl --action get-vm-device-details --directory /var/lib/mysql --sname zrmSuHQK1QGyF 2>/tmp/hAp1pah4M9
dailyrun:backup:INFO: getting device details using command /usr/share/mysql-zrm/plugins/lvm-snapshot.pl --action get-vm-device-details --directory "/var/lib/mysql//mysql" --sname zrmovi9X0Ixlg 2>/tmp/hAp1pah4M9
dailyrun:backup:INFO: getting device details using command /usr/share/mysql-zrm/plugins/lvm-snapshot.pl --action get-vm-device-details --directory "/var/lib/mysql//mydb_dbo" --sname zrmtqGGKzVdcl 2>/tmp/hAp1pah4M9
dailyrun:backup:INFO: getting device details using command /usr/share/mysql-zrm/plugins/lvm-snapshot.pl --action get-vm-device-details --directory "/var/lib/mysql//mydbv2" --sname zrmFtj50u4rS0 2>/tmp/hAp1pah4M9
dailyrun:backup:INFO: getting device details using command /usr/share/mysql-zrm/plugins/lvm-snapshot.pl --action get-vm-device-details --directory "/var/lib/mysql//mydbwebber_dbo" --sname zrmdAfovlTEEb 2>/tmp/hAp1pah4M9
dailyrun:backup:INFO: Locking tables and creating snapshot
dailyrun:backup:INFO: mysql --user="root" --password="*****" -e "flush tables with read lock; flush logs; show master status;system (/usr/share/mysql-zrm/plugins/lvm-snapshot.pl --action create-snapshot --dev /dev/mydbdb02/root --size 2G --sname zrm6HmDg7bC6o --directory /network/nas01/shares/replica/Backup/mydbDB/dailyrun/20100126084352/ZRM_MOUNTS/zrm6HmDg7bC6o >/tmp/zrm6HmDg7bC6o.log 2>&1 ); unlock tables;"
dailyrun:backup:INFO: dailyrun:backup:INFO: Output of command: 'Locking tables and creating snapshot' is {
File descriptor 3 left open
Logical volume "zrm6HmDg7bC6o" created
}
dailyrun:backup:INFO: Mounting snapshot
dailyrun:backup:INFO: /usr/share/mysql-zrm/plugins/lvm-snapshot.pl --action mount --dev /dev/mydbdb02/zrm6HmDg7bC6o --directory /network/nas01/shares/replica/Backup/mydbDB/dailyrun/20100126084352/ZRM_MOUNTS/zrm6HmDg7bC6o --fstype ext4
dailyrun:backup:WARNING: Snapshot failed as copy failed
dailyrun:backup:WARNING: Unable to use snapshot
dailyrun:backup:INFO: Unmounting
dailyrun:backup:INFO: /usr/share/mysql-zrm/plugins/lvm-snapshot.pl --action umount --directory /network/nas01/shares/replica/Backup/mydbDB/dailyrun/20100126084352/ZRM_MOUNTS/zrm6HmDg7bC6o
dailyrun:backup:INFO: /usr/share/mysql-zrm/plugins/lvm-snapshot.pl --action remove-snapshot --dev "/dev/mydbdb02/zrm6HmDg7bC6o" > /tmp/hAp1pah4M9 2>&1
dailyrun:backup:INFO: PHASE END: Creating snapshot based backup
dailyrun:backup:INFO: PHASE START: Find table type
dailyrun:backup:INFO: Command used for getting engine type mysql --user="root" --password="*****" -e "show table status from \`mysql\`"
dailyrun:backup:INFO: For database mysql
dailyrun:backup:INFO: engine
dailyrun:backup:INFO: MyISAM
dailyrun:backup:INFO: MyISAM
dailyrun:backup:INFO: MyISAM
dailyrun:backup:INFO: MyISAM
dailyrun:backup:INFO: CSV
dailyrun:backup:INFO: MyISAM
dailyrun:backup:INFO: MyISAM
dailyrun:backup:INFO: MyISAM
dailyrun:backup:INFO: MyISAM
dailyrun:backup:INFO: MyISAM
dailyrun:backup:INFO: MyISAM
dailyrun:backup:INFO: MyISAM
dailyrun:backup:INFO: MyISAM
dailyrun:backup:INFO: MyISAM
dailyrun:backup:INFO: MyISAM
dailyrun:backup:INFO: CSV
dailyrun:backup:INFO: MyISAM
dailyrun:backup:INFO: MyISAM
dailyrun:backup:INFO: MyISAM
dailyrun:backup:INFO: MyISAM
dailyrun:backup:INFO: MyISAM
dailyrun:backup:INFO: MyISAM
dailyrun:backup:INFO: MyISAM
dailyrun:backup:INFO: Command used for getting engine type mysql --user="root" --password="*****" -e "show table status from \`mydb_dbo\`"
dailyrun:backup:INFO: For database mydb_dbo
dailyrun:backup:INFO: engine
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: Command used for getting engine type mysql --user="root" --password="*****" -e "show table status from \`mydbv2\`"
dailyrun:backup:INFO: For database mydbv2
dailyrun:backup:INFO: engine
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: NULL
dailyrun:backup:INFO: NULL
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: NULL
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: NULL
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: NULL
dailyrun:backup:INFO: NULL
dailyrun:backup:INFO: NULL
dailyrun:backup:INFO: NULL
dailyrun:backup:INFO: NULL
dailyrun:backup:INFO: Command used for getting engine type mysql --user="root" --password="*****" -e "show table status from \`mydbwebber_dbo\`"
dailyrun:backup:INFO: For database mydbwebber_dbo
dailyrun:backup:INFO: engine
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: InnoDB
dailyrun:backup:INFO: PHASE END: Find table type
dailyrun:backup:INFO: PHASE START: Creating raw backup
dailyrun:backup:INFO: Command used for raw backup is mysqlhotcopy --user="root" --password="*****" --quiet mysql "/network/nas01/shares/replica/Backup/mydbDB/dailyrun/20100126084352" > /tmp/hAp1pah4M9 2>&1
dailyrun:backup:ERROR: Output of command: 'mysqlhotcopy' is {
DBD::mysql::db do failed: You can't use locks with log tables. at /usr/bin/mysqlhotcopy line 452.
}
dailyrun:backup:ERROR: mysqlhotcopy did not succeed. Command used is mysqlhotcopy --user="root" --password="*****" --quiet mysql "/network/nas01/shares/replica/Backup/mydbDB/dailyrun/20100126084352" > /tmp/hAp1pah4M9 2>&1 Return value is 65280
dailyrun:backup:INFO: PHASE START: Cleanup
dailyrun:backup:INFO: backup-status=Backup failed
dailyrun:backup:INFO: Backup failed
dailyrun:backup:INFO: mailing file /tmp/kFVGNbReYS
dailyrun:backup:INFO: mail command is cat "/tmp/kFVGNbReYS"|mail -s "[ZRM for MySQL Report] ERROR during backup of backup-set dailyrun" mike@domain.net
dailyrun:backup:INFO: PHASE END: Cleanup
dailyrun:backup:INFO: END OF BACKUP

paddy
January 26th, 2010, 12:02 PM
dailyrun:backup:INFO: /usr/share/mysql-zrm/plugins/lvm-snapshot.pl --action mount --dev /dev/mydbdb02/zrm6HmDg7bC6o --directory /network/nas01/shares/replica/Backup/mydbDB/dailyrun/20100126084352/ZRM_MOUNTS/zrm6HmDg7bC6o --fstype ext4
dailyrun:backup:WARNING: Snapshot failed as copy failed
dailyrun:backup:WARNING: Unable to use snapshot

Please check mysql user can be read the database files.

-----------
dailyrun:backup:ERROR: Output of command: 'mysqlhotcopy' is {
DBD::mysql::db do failed: You can't use locks with log tables. at /usr/bin/mysqlhotcopy line 452.
}

this is a known problem with mysqlhotcopy. http://bugs.mysql.com/bug.php?id=43594

Paddy

psyferre
January 28th, 2010, 09:01 AM
Thanks for your reply, Paddy. Yes, the mysql user definitely has access to those files, as I'm currently running it under a superuser account.

I'm not really worried about the mysqlhotcopy error, since if the snapshot succeeds mysqlhotcopy will never be used.

paddy
January 28th, 2010, 01:25 PM
Does mysql user has permissions to create files on the /tmp?

Paddy

psyferre
January 28th, 2010, 08:19 PM
Yes, it's running under the root account, so it should have permissions.

paddy
April 19th, 2010, 02:08 PM
Snapshot backups create symlinks in the "destination" directory. Symlinks will not work
on CIFS share.
Paddy