PDA

View Full Version : how to properly backup as incremental?



fedora
August 15th, 2007, 01:45 AM
Hi guys,

Seems like I missed out something. I have enabled binary log in MySQL server client and did gave MySQL pemission ( user dbbackup + password + permision). In server, I did specified user as dbbackup and password in global conf.

When backing up with level 0, I was successfully done but if I do backup with level 1 (incremental), it asked me to enter the password for mysql user:

[root@pc ~]# mysql-zrm --action backup --backup-set cent6_backupset --backup-level 1
backup:INFO: ZRM for MySQL Community Edition - version 1.2
cent6_backupset:backup:INFO: backup-set=cent6_backupset
cent6_backupset:backup:INFO: backup-date=20070815160710
cent6_backupset:backup:INFO: host=client.company.com
cent6_backupset:backup:INFO: backup-date-epoch=1187165230
cent6_backupset:backup:INFO: mysql-zrm-version=ZRM for MySQL Community Edition - version 1.2
cent6_backupset:backup:INFO: mysql-version=4.1.22-standard-log
cent6_backupset:backup:INFO: backup-directory=/var/lib/mysql-zrm/cent6_backupset/20070815160710
cent6_backupset:backup:INFO: backup-level=1
mysql@client.company.com's password:

Then I tried this command:
mysql-zrm --action backup --user dbbackup --password password --backup-set cent6_backupset --backup-level 1,

I got the same result. As I mentioned above, I already assigned the backup user as dbbackup. How to make it backing up using dbbackup user instead of mysql user??

fedora
August 23rd, 2007, 01:34 AM
The problem above has been resolved but I got another problem. Anyone know this kind of errors?


[root@cent7 /etc/mysql-zrm]# mysql-zrm-scheduler --now --backup-set cent6_backupset --backup-level 1
schedule:INFO: ZRM for MySQL Community Edition - version 1.2
Logging to /var/log/mysql-zrm/mysql-zrm-scheduler.log
backup:INFO: ZRM for MySQL Community Edition - version 1.2
cent6_backupset:backup:INFO: backup-set=cent6_backupset
cent6_backupset:backup:INFO: backup-date=20070823172907
cent6_backupset:backup:INFO: host=cent6.domain.com
cent6_backupset:backup:INFO: backup-date-epoch=1187861347
cent6_backupset:backup:INFO: mysql-zrm-version=ZRM for MySQL Community Edition - version 1.2
cent6_backupset:backup:INFO: mysql-version=4.1.22-standard-log
cent6_backupset:backup:INFO: backup-directory=/var/lib/mysql-zrm/cent6_backupset/20070823172907
cent6_backupset:backup:INFO: backup-level=1

gzip: stdin: unexpected end of file
/bin/tar: Child returned status 1
/bin/tar: Error exit delayed from previous errors
close of pipe failed
cent6_backupset:backup:ERROR: Could not copy file /var/log/mysql-zrm/mysqld-bin.000080
cent6_backupset:backup:ERROR: copy-plugin exited with error 512
cent6_backupset:backup:ERROR: Could not copy bin log file mysqld-bin.000080
cent6_backupset:backup:INFO: incremental=mysqld-bin.[0-9]*
cent6_backupset:backup:INFO: next-binlog=mysqld-bin.000081
cent6_backupset:backup:INFO: last-backup=/var/lib/mysql-zrm/cent6_backupset/20070823172834
cent6_backupset:backup:INFO: backup-size=0.00 MB
cent6_backupset:backup:INFO: compress=
cent6_backupset:backup:INFO: backup-size-compressed=0.00 MB
cent6_backupset:backup:INFO: read-locks-time=00:00:00
cent6_backupset:backup:INFO: flush-logs-time=00:00:00
cent6_backupset:backup:INFO: compress-encrypt-time=00:00:00
cent6_backupset:backup:INFO: backup-time=00:00:00
cent6_backupset:backup:INFO: backup-status=Backup done but with errors
cent6_backupset:backup:INFO: Backup done but with errors
ERROR: /usr/bin/mysql-zrm did not finish successfully

kkg
September 4th, 2007, 01:00 AM
The problem above has been resolved but I got another problem. Anyone know this kind of errors?


[root@cent7 /etc/mysql-zrm]# mysql-zrm-scheduler --now --backup-set cent6_backupset --backup-level 1
schedule:INFO: ZRM for MySQL Community Edition - version 1.2
Logging to /var/log/mysql-zrm/mysql-zrm-scheduler.log
backup:INFO: ZRM for MySQL Community Edition - version 1.2
cent6_backupset:backup:INFO: backup-set=cent6_backupset
cent6_backupset:backup:INFO: backup-date=20070823172907
cent6_backupset:backup:INFO: host=cent6.domain.com
cent6_backupset:backup:INFO: backup-date-epoch=1187861347
cent6_backupset:backup:INFO: mysql-zrm-version=ZRM for MySQL Community Edition - version 1.2
cent6_backupset:backup:INFO: mysql-version=4.1.22-standard-log
cent6_backupset:backup:INFO: backup-directory=/var/lib/mysql-zrm/cent6_backupset/20070823172907
cent6_backupset:backup:INFO: backup-level=1

gzip: stdin: unexpected end of file
/bin/tar: Child returned status 1
/bin/tar: Error exit delayed from previous errors
close of pipe failed
cent6_backupset:backup:ERROR: Could not copy file /var/log/mysql-zrm/mysqld-bin.000080
cent6_backupset:backup:ERROR: copy-plugin exited with error 512
cent6_backupset:backup:ERROR: Could not copy bin log file mysqld-bin.000080
cent6_backupset:backup:INFO: incremental=mysqld-bin.[0-9]*
cent6_backupset:backup:INFO: next-binlog=mysqld-bin.000081
cent6_backupset:backup:INFO: last-backup=/var/lib/mysql-zrm/cent6_backupset/20070823172834
cent6_backupset:backup:INFO: backup-size=0.00 MB
cent6_backupset:backup:INFO: compress=
cent6_backupset:backup:INFO: backup-size-compressed=0.00 MB
cent6_backupset:backup:INFO: read-locks-time=00:00:00
cent6_backupset:backup:INFO: flush-logs-time=00:00:00
cent6_backupset:backup:INFO: compress-encrypt-time=00:00:00
cent6_backupset:backup:INFO: backup-time=00:00:00
cent6_backupset:backup:INFO: backup-status=Backup done but with errors
cent6_backupset:backup:INFO: Backup done but with errors
ERROR: /usr/bin/mysql-zrm did not finish successfully


If you store the binary logs in a seperate directory, you need to provide the location of this using the mysql-binlog-path option.

If that does not solve the problem could you please provide the verbose logs?

--kkg