Menu

#25 Problem restoring link files

v1.0 (example)
open
None
5
2014-04-01
2014-04-01
No

I have had trouble restoring certain link files. An example is /usr/bin/nano which is a link to /bin/nano.

The link backs up correctly. It's the restore that fails. The first time I tried it, I got the error message:

 tar: usr/bin/nano: Not found in archive

However the file was in the archive and the link worked when restored.

The second time I tried it, I got no error message on restore, however the restore failed just the same. Again, the file was in the archive.

I am running backup2l v1.5 on Debian Jessie Gnu Linux. The driver is 'DRIVER_TAR_GZ'. The tar version is:

 tar (GNU tar) 1.27.1

The following is console output illustrating the problem:

First the backup:

Start of backup console log

dspence@dws-linux:~$ sudo backup2l -c ./backup2l.conf -b >out 2>err
[sudo] password for dspence:
dspence@dws-linux:~$ cat out
backup2l v1.5 by Gundolf Kiefer

Mon Mar 31 18:59:58 EDT 2014

Running pre-backup procedure...
pre-backup: nothing to do

Removing old backups...

Preparing full backup <all.1>...
2290 / 2290 file(s), 2 / 2 dir(s), 267.4MB / 267.4MB (uncompressed)
skipping: 0 file(s), 0 dir(s), 0 B (uncompressed)

Creating archive using 'DRIVER_TAR_GZ'...
tar: Removing leading `/' from hard link targets
Checking TOC of archive file (< real file, > archive entry)...
Creating check file for <all.1>...

Running post-backup procedure...
post-backup: barking three times

Mon Mar 31 19:01:25 EDT 2014

Summary
=======

Backup Date Time | Size | Skipped Files+D | New Obs. | Err.


all.1 2014-03-31 18:59 | 144.7M | 0 2292 | 2292 0 | 0

Filesystem Size Used Avail Use% Mounted on
/dev/sdb1 233G 212G 22G 91% /media/backups
dspence@dws-linux:~$ cat err
dspence@dws-linux:~$ dir err
-rw-r--r-- 1 dspence dspence 0 Mar 31 18:59 err

End of backup console log

Here is a --locate:

Start of locate console log

dspence@dws-linux:~$ sudo backup2l -c ./backup2l.conf -l /usr/bin/nano
backup2l v1.5 by Gundolf Kiefer

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

Listing locations...
all.1: /usr/bin/nano

All required archive files are present in /media/backups/Backups/dws-linux/test.

End of locate console log

Here is a --restore attempt. Note that it claimed to restore 1 file, the 1 file that locate found in the archive. But according to my dir (ls -l) command, the file did not restore. The file /usr/bin/nano.sav is my renaming of the original /usr/bin/nano file. Next comes the tar version. Note, finally, that the file "/usr/bin/nano -> /bin/nano" is in fact in the tarball.

Start of restore console log

dspence@dws-linux:~$ sudo backup2l -c ./backup2l.conf -r /usr/bin/nano
backup2l v1.5 by Gundolf Kiefer

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

Restoring files...
all.1.tar.gz: 1 file(s) using 'DRIVER_TAR_GZ'
dspence@dws-linux:~$ dir /usr/bin/nano*
lrwxrwxrwx 1 root root 9 Jan 19 19:02 /usr/bin/nano.sav -> /bin/nano
dspence@dws-linux:~$ tar --version
tar (GNU tar) 1.27.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
dspence@dws-linux:~$ tar -tvf /media/backups/Backups/dws-linux/test/all.1.tar.gz|grep usr/bin/nano
lrwxrwxrwx root/root 0 2014-01-19 19:02 usr/bin/nano -> /bin/nano

End of restore console log

Discussion


Log in to post a comment.