Menu

#21 DRIVER_TAR_GPG cannot restore

open
nobody
None
5
2014-08-18
2011-11-06
No

I am using DRIVER_TAR_GPG to create encrypted backups. However, that driver cannot restore:

# backup2l -r "mysql_backup-3.4"
backup2l v1.5 by Gundolf Kiefer

Active files in <server11.1001>: 2
found in server11.1001: 2 ( 0 left)

Cannot access archive file(s) of the following backup(s):
server11.1001

Nothing has been restored.

While backup2l is able to locate the file, it seems that it cannot find the archive files:

# backup2l -l "mysql_backup-3.4"
backup2l v1.5 by Gundolf Kiefer

Active files in <server11.1001>: 2
found in server11.1001: 2 ( 0 left)

Listing locations...
server11.1001: /root/nightly_backup/mysql_backup-3.4
server11.1001: /root/nightly_backup/mysql_backup-3.4.dist

To restore, the archive files of the following backups are missing and
have to be copied or linked into /backup/nightly_incremental:
server11.1001

However, all required files are in /backup/nightly_incremental:

# ls -la /backup/nightly_incremental/server11.1001*
rw-r--r-- 1 root root 408 2011-11-06 05:03 /backup/nightly_incremental/server11.1001.check
-rw-r--r-- 1 root root 39 2011-11-06 05:03 /backup/nightly_incremental/server11.1001.error.gz
-rw-r--r-- 1 root root 1329749 2011-11-06 05:00 /backup/nightly_incremental/server11.1001.list.gz
-rw-r--r-- 1 root root 1317329 2011-11-06 05:00 /backup/nightly_incremental/server11.1001.new.gz
-rw-r--r-- 1 root root 1291 2011-11-06 05:00 /backup/nightly_incremental/server11.1001.obsolete.gz
-rw-r--r-- 1 root root 41 2011-11-06 05:00 /backup/nightly_incremental/server11.1001.skipped.gz
-rw-r--r-- 1 root root 1828000179 2011-11-06 05:02 /backup/nightly_incremental/server11.1001.tar.pgp

Discussion

  • Martin Burger

    Martin Burger - 2011-11-06

    I missed to set USER_DRIVER_LIST="DRIVER_TAR_GPG". It is somehow dangerous that it seems that backups are created correctly without setting USER_DRIVER_LIST, but restoring later fails.

    However, now backup2l is neither able to restore old nor new backups.

    Old backup:

    # backup2l -r "mysql_backup-3.4"
    backup2l v1.5 by Gundolf Kiefer

    Active files in <server11.1001>: 2
    found in server11.1001: 2 ( 0 left)

    Restoring files...
    server11.1001.tar.pgp: 2 file(s) using 'DRIVER_TAR_GPG'
    tar: This does not look like a tar archive
    tar: Skipping to next header
    tar: root/nightly_backup/mysql_backup-3.4: Not found in archive
    tar: root/nightly_backup/mysql_backup-3.4.dist: Not found in archive
    tar: Exiting with failure status due to previous errors

    New backup:

    # backup2l -r "mysql_backup-3.4"
    backup2l v1.5 by Gundolf Kiefer

    Active files in <server11.1>: 3
    found in server11.1: 3 ( 0 left)

    Restoring files...
    server11.1.tar.pgp: 3 file(s) using 'DRIVER_TAR_GPG'
    tar: This does not look like a tar archive
    tar: Skipping to next header
    tar: Archive contains `\016\325\2208\325 }\304L\245\362\034' where numeric off_t value expected
    tar: Archive contains `L\300\f\306{\257\017\305' where numeric mode_t value expected
    tar: Archive contains `\201\275O\370~\255\271N\362\025\247@' where numeric time_t value expected
    tar: Archive contains `)\272S\322\324k\005\036' where numeric uid_t value expected
    tar: Archive contains `\201%w\342\027\315\200B' where numeric gid_t value expected
    tar: Skipping to next header
    tar: Archive contains `\322\326\346\261\030\247\370\257\367\033\023\367' where numeric off_t value expected
    tar: Archive contains `\376V\212D \377\371\n' where numeric mode_t value expected
    tar: Archive base-256 value is out of time_t range
    tar: Archive contains `\371\352\0\315\305\030\']' where numeric uid_t value expected
    tar: Archive contains `\363. \260\306.\325\245' where numeric gid_t value expected
    tar: Skipping to next header
    tar: root/backups/joe/mysql_backup-3.4~: Not found in archive
    tar: root/nightly_backup/mysql_backup-3.4: Not found in archive
    tar: root/nightly_backup/mysql_backup-3.4.dist: Not found in archive
    tar: Exiting with failure status due to previous errors

     
  • Holger Segnitz

    Holger Segnitz - 2012-03-24

    I can somehow confirm this - and have additional information:

    Doing a full backup + a full restore afterwards produces a large list of error messages and all files that were in the backup were created as empty directories.

    Example:

    /etc/rsyncd.conf

    became

    /etc/rsyncd.conf/

    with nothing in.

    Just a wild guess: might be a leading/trailing slash issue

    -----

    I created a driver that combines the bundled GPG driver + a LZMA driver I found (by Amadee Van Gasse), so I suspected my own code behaving erratic. I then tried the bundled GPG driver which had the same issues.

    I'll be happy to provide the driver if the issue is fixed!

     
  • Holger Segnitz

    Holger Segnitz - 2012-03-24

    yeah! fixed it! :)

    there is a superfluous parameter in the tar command at the end "-f $3", just remove that and it works fine -- well, at least on my machine:

    -extract) # Arguments: $2 = BID, $3 = archive file name, $4 = file list file
    # /usr/bin/gpg --batch --no-tty -q --passphrase-fd 3 3</etc/backup2l.pass -d $3 2>/dev/null | tar -x --same-permission --same-owner -f $3 -T $4 2>&1
    /usr/bin/gpg --batch --no-tty -q --passphrase-fd 3 3</etc/backup2l.pass -d $3 2>/dev/null | tar -x --same-permission --same-owner -T $4 2>&1
    ;;

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.