Results 1 to 4 of 4

Thread: Incremental backup succeeded, restore fails

  1. #1

    Default Incremental backup succeeded, restore fails

    Hello ! I use the same title a past thread...


    here all what i did....

    thanks in advance

    1. Created test database.
    2. Take one full of test backup.
    3. Add some rows in to one of the table of test database.
    4. Take incremental of test db
    5. Dropped test database.
    6. Restored full backup
    7. Tried to restore incremental backup and see the data of the table.
    



    1.
    mysql> create database test2;
    Query OK, 1 row affected (0.00 sec)

    mysql> use test2;
    Database changed

    mysql> CREATE TABLE utenti
    -> (
    -> id INT(20) NOT NULL AUTO_INCREMENT,
    -> nomnativo VARCHAR(50) DEFAULT '-' NOT NULL,
    -> PRIMARY KEY (id)
    -> )
    -> ;
    Query OK, 0 rows affected (0.10 sec)
    2.
    root@ubuntuServer:/BACKUP/archivelogs# mysql-zrm-scheduler --now --backup-set dailyrun
    schedule:INFO: ZRM for MySQL Community Edition - version 2.2.0
    Logging to /var/log/mysql-zrm/mysql-zrm-scheduler.log
    backup:INFO: ZRM for MySQL Community Edition - version 2.2.0
    dailyrun:backup:INFO: START OF BACKUP
    dailyrun:backup:INFO: PHASE START: Initialization
    dailyrun:backup:INFO: backup-set=dailyrun
    dailyrun:backup:INFO: backup-date=20110309174954
    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=1299689394
    dailyrun:backup:INFO: mysql-zrm-version=ZRM for MySQL Community Edition - version 2.2.0
    dailyrun:backup:INFO: mysql-version=5.1.49-1ubuntu8.1-log
    dailyrun:backup:INFO: backup-directory=/var/lib/mysql-zrm/dailyrun/20110309174954
    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: PHASE END: Running pre backup plugin
    dailyrun:backup:INFO: PHASE START: Flushing logs
    dailyrun:backup:INFO: PHASE END: Flushing logs
    dailyrun:backup:INFO: PHASE START: Find table type
    dailyrun:backup:INFO: PHASE END: Find table type
    dailyrun:backup:INFO: PHASE START: Creating raw backup
    dailyrun:backup:INFO: raw-databases=mysql test test2
    dailyrun:backup:INFO: PHASE END: Creating raw backup
    dailyrun:backup:INFO: PHASE START: Calculating backup size & checksums
    dailyrun:backup:INFO: next-binlog=mysql-bin.1
    dailyrun:backup:INFO: last-backup=/var/lib/mysql-zrm/dailyrun/20110309155858
    dailyrun:backup:INFO: backup-size=0.87 MB
    dailyrun:backup:INFO: PHASE END: Calculating backup size & checksums
    dailyrun:backup:INFO: read-locks-time=00:00:00
    dailyrun:backup:INFO: flush-logs-time=00:00:01
    dailyrun:backup:INFO: backup-time=00:00:01
    dailyrun:backup:INFO: backup-status=Backup succeeded
    dailyrun:backup:INFO: Backup succeeded
    dailyrun:backup:INFO: PHASE START: Running post backup plugin
    dailyrun:backup:INFO: PHASE END: Running post backup plugin
    dailyrun:backup:INFO: PHASE START: Cleanup
    dailyrun:backup:INFO: PHASE END: Cleanup
    dailyrun:backup:INFO: END OF BACKUP
    /usr/bin/mysql-zrm started successfully

    3.

    mysql> insert into utenti values (1, 'italo');
    Query OK, 1 row affected (0.00 sec)

    mysql> insert into utenti values (2,'pippo');
    Query OK, 1 row affected (0.00 sec)

    mysql> insert into utenti values (3,'pluto');
    Query OK, 1 row affected (0.00 sec)

    4.
    mysql-zrm-scheduler --now --backup-set orario

    root@ubuntuServer:/var/lib/mysql-zrm/orario/20110309160219# mysql-zrm-scheduler --now --backup-set orario
    schedule:INFO: ZRM for MySQL Community Edition - version 2.2.0
    Logging to /var/log/mysql-zrm/mysql-zrm-scheduler.log
    backup:INFO: ZRM for MySQL Community Edition - version 2.2.0
    orario:backup:INFO: START OF BACKUP
    orario:backup:INFO: PHASE START: Initialization
    orario:backup:INFO: backup-set=orario
    orario:backup:INFO: backup-date=20110309175230
    orario:backup:INFO: mysql-server-os=Linux/Unix
    orario:backup:INFO: backup-type=regular
    orario:backup:INFO: host=localhost
    orario:backup:INFO: backup-date-epoch=1299689550
    orario:backup:INFO: mysql-zrm-version=ZRM for MySQL Community Edition - version 2.2.0
    orario:backup:INFO: mysql-version=5.1.49-1ubuntu8.1-log
    orario:backup:INFO: backup-directory=/var/lib/mysql-zrm/orario/20110309175230
    orario:backup:INFO: backup-level=1
    orario:backup:INFO: PHASE END: Initialization
    orario:backup:INFO: PHASE START: Running pre backup plugin
    orario:backup:INFO: PHASE END: Running pre backup plugin
    orario:backup:INFO: PHASE START: Flushing logs
    orario:backup:INFO: PHASE END: Flushing logs
    orario:backup:INFO: PHASE START: Creating incremental backup
    orario:backup:INFO: incremental=mysql-bin.[0-9]*
    orario:backup:INFO: PHASE END: Creating incremental backup
    orario:backup:INFO: PHASE START: Calculating backup size & checksums
    orario:backup:INFO: next-binlog=mysql-bin.1
    orario:backup:INFO: last-backup=/var/lib/mysql-zrm/orario/20110309171926
    orario:backup:INFO: backup-size=0.00 MB
    orario:backup:INFO: PHASE END: Calculating backup size & checksums
    orario:backup:INFO: read-locks-time=00:00:00
    orario:backup:INFO: flush-logs-time=00:00:00
    orario:backup:INFO: backup-time=00:00:00
    orario:backup:INFO: backup-status=Backup succeeded
    orario:backup:INFO: Backup succeeded
    orario:backup:INFO: PHASE START: Running post backup plugin
    orario:backup:INFO: PHASE END: Running post backup plugin
    orario:backup:INFO: PHASE START: Cleanup
    orario:backup:INFO: PHASE END: Cleanup
    orario:backup:INFO: END OF BACKUP
    /usr/bin/mysql-zrm started successfully

    5.
    mysql> drop database test2;
    Query OK, 1 row affected (0.03 sec)

    mysql> show databases;
    +--------------------+
    | Database |
    +--------------------+
    | information_schema |
    | mysql |
    | test |
    +--------------------+
    3 rows in set (0.00 sec)

    6.
    root@ubuntuServer:/var/lib/mysql-zrm/orario/20110309160219# mysql-zrm-reporter
    reporter:WARNING: Backup root directory not specified, Assigning default value as /var/lib/mysql-zrm

    REPORT TYPE : backup-status-info

    backup_set backup_date backup_level backup_status backup_type comment
    -----------------------------------------------------------------------------------------------------------------------------
    orario Wed 09 Mar 2011 05:52:30 1 Backup succeeded regular ----
    PM CET
    dailyrun Wed 09 Mar 2011 05:49:54 0 Backup succeeded regular ----
    PM CET

    reporter:WARNING: Backup root directory not specified, Assigning default value as /var/lib/mysql-zrm

    REPORT TYPE : restore-info

    backup_set backup_date backup_level backup_directory backup_status comment
    -----------------------------------------------------------------------------------------------------------------------------------------------------
    dailyrun Wed 09 Mar 2011 05:49:54 0 /var/lib/mysql-zrm/dailyrun/201103091749 Backup succeeded ----
    PM CET 54

    root@ubuntuServer:/var/lib/mysql-zrm/orario/20110309160219# mysql-zrm --action restore --backup-set dailyrun --source-directory /var/lib/mysql-zrm/dailyrun/20110309174954
    restore:INFO: ZRM for MySQL Community Edition - version 2.2.0
    dailyrun:restore:INFO: Restored database from raw backup: mysql
    dailyrun:restore:INFO: Restored database from raw backup: test
    dailyrun:restore:INFO: Restored database from raw backup: test2
    dailyrun:restore:INFO: Restore done in 6 seconds.
    MySQL server has been shutdown. Please restart after verification.

    database presente

    mysql> use test2;
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A

    Database changed
    mysql> select count(*) from utenti;
    +----------+
    | count(*) |
    +----------+
    | 0 |
    +----------+
    1 row in set (0.00 sec)

    root@ubuntuServer:/var/lib/mysql-zrm/orario/20110309160219# mysql-zrm-reporter --show restore-info --where backup-set=orario
    reporter:WARNING: Backup root directory not specified, Assigning default value as /var/lib/mysql-zrm

    REPORT TYPE : restore-info

    backup_set backup_date backup_level backup_directory backup_status comment
    -----------------------------------------------------------------------------------------------------------------------------------------------------
    orario Wed 09 Mar 2011 05:52:30 1 /var/lib/mysql-zrm/orario/20110309175230 Backup succeeded ----
    PM CET


    root@ubuntuServer:/var/lib/mysql-zrm/orario/20110309160219# mysql-zrm --action restore --backup-set orario --source-directory /var/lib/mysql-zrm/orario/20110309175230
    restore:INFO: ZRM for MySQL Community Edition - version 2.2.0
    orario:restore:INFO: BINLOG = mysqlbinlog "/var/lib/mysql-zrm/orario/20110309175230"/mysql-bin.[0-9]* >> /tmp/sVaz5XKRp6
    mysqlbinlog: File '/var/lib/mysql-zrm/orario/20110309175230/mysql-bin.[0-9]*' not found (Errcode: 2)
    ERROR: Incremental restore failed
    orario:restore:ERROR: Incremental restore failed
    orario:restore:ERROR: Restore failed

  2. #2
    Join Date
    Oct 2005
    Posts
    1,559

    Default

    What does /var/lib/mysql-zrm/orario/20110309175230 contain?

  3. #3

    Default

    root@ubuntuServer:/var/lib/mysql-zrm/orario/20110309175230# ls -lrt
    total 8
    -rw-r--r-- 1 root root 539 2011-03-09 17:52 index
    -rw-r--r-- 1 root root 58 2011-03-09 17:52 zrm_checksum


    thanks in advance for the answer

  4. #4
    Join Date
    Oct 2005
    Posts
    1,559

    Default

    This implies incremental backup was not correct eventhough it reported it as successful.
    Please check incremental backup logs. Most likely, the issue is with ownership of binary logs. It should be readable by mysql user (default user used by ZRM client)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •