SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
Serious data loss using rdiff-backup
Author Message
Post Serious data loss using rdiff-backup 
Hi,

I was just wondering if anything is happening with this? Thanks.

Regards,
Alistair

On Thu, 23 Sep 2004 11:25:10 +1000, Alistair Popple
<alistair.popple < at > gmail.com> wrote:
Hmm... so do you think when the symlink to /usr was deleted, /usr was
deleted along with it?

This is probably best explained with an example I used to replicate
the problem on a test system at home. Hopefully this is
understandable (I can clarify anything if it isn't):

I created the following directory structure in /tmp/rdiff-backup-test/src:

.
|-- test1
| |-- test1.1
| | |-- a
| | |-- b
| | `-- c
| `-- test1.2
| |-- d
| |-- e
| `-- f
`-- test2
|-- test2.1
| `-- test1.1
| |-- g
| |-- h
| `-- i
`-- test2.2
|-- j
|-- k
`-- l

The following steps were then performed:
* rdiff-backup -v7 alistair < at > 127.0.0.1::/tmp/rdiff-backup-test/src/
/tmp/rdiff-backup-test/dest/
* mv /tmp/rdiff-backup-test/src/test2/test2.1
/tmp/rdiff-backup-test/src/test2/test2.1.old
* ln -s /tmp/rdiff-backup-test/src/test1
/tmp/rdiff-backup-test/src/test2/test2.1
* rdiff-backup -v7 alistair < at > 127.0.0.1::/tmp/rdiff-backup-test/src/
/tmp/rdiff-backup-test/dest/

At this point everything should be fine and working as expected. The
following directory structure exists in the desination directory:

|-- rdiff-backup-data
| |-- ......................
|-- test1
| |-- test1.1
| | |-- a
| | |-- b
| | `-- c
| `-- test1.2
| |-- d
| |-- e
| `-- f
`-- test2
|-- test2.1 -> /tmp/rdiff-backup-test/src/test1/
|-- test2.1.old
| `-- test1.1
| |-- g
| |-- h
| `-- i
`-- test2.2
|-- j
|-- k
`-- l

Note the symlink from test2.1 to a file outside the destination path.

However if the backup fails (eg. it is interrupted halfway through)
then the desintation directory needs checking:
* rdiff-backup -v7 --check-desintation /tmp/rdiff-backup-test/dest

It is at this point the problems begin. If you check
/tmp/rdiff-backup-test/src/test1 (a directory outside of the
destination) you will find that the test1.1 directory has been
deleted. This only happens for the directories mentioned in the
original (non-linked) version of test2.1, which is why test1.2
remains. The problem here seems to be that the check-destination-dir
option follows the symlinks rather than treating them as files. If
the link is changed to a relative one then sure enough no directories
outside of the destination seem to be modified, however after the
destination check test1.1 is missing from the destination/backup - ie.
it has _not_ been backed up. Performing subsequent backups will also
not back that information up, even if the relative symlink is removed,
thus the backups remain incomplete for what I assume is ever more.


Post Serious data loss using rdiff-backup 
Alistair Popple wrote:

Hmm... so do you think when the symlink to /usr was deleted, /usr was
deleted along with it?

This is probably best explained with an example I used to replicate
the problem on a test system at home. Hopefully this is
understandable (I can clarify anything if it isn't):

(....)

* rdiff-backup -v7 --check-desintation /tmp/rdiff-backup-test/dest

It is at this point the problems begin. If you check
/tmp/rdiff-backup-test/src/test1 (a directory outside of the
destination) you will find that the test1.1 directory has been
deleted. This only happens for the directories mentioned in the
original (non-linked) version of test2.1, which is why test1.2 (...)

Hi,

so ... basically this means that rdiff-backup cannot deal with symlinks
properly?

As a workaround, is there a way to force rdiff-backup to NOT use symlinks
(but record symlink information in the metadata only) even if the
destination FS can deal with them?

Something like "--windows-mode" but for symlinks?


--
Jens Benecke
http://www.hitchhikers.de - Europas kostenlose Mitfahrzentrale seit 1998
http://www.rb-hosting.de - Webhosting mit Extras - PHP ab ¤9 - SSH ab ¤19
http://www.spamfreemail.de - 100% saubere Postfächer, garantiert!

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB