rdiff-backup-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[rdiff-backup-users] Re: Re: How are moved/renamed files treated?


From: Jens Benecke
Subject: [rdiff-backup-users] Re: Re: How are moved/renamed files treated?
Date: Fri, 15 Aug 2003 15:33:56 +0200
User-agent: KNode/0.7.6

Jens Benecke wrote:

> I will. If I put all the moved files (with identical or nearly identical
> contents) into one big (uncompressed) .tar file, rsync and rdiff _should_
> notice the identical parts and not duplicate them, right?

I tried this and failed. 
There is a problem with rdiff. Maybe you can help me.

I wrote this script:

------------------------------------------------------------------------
#!/bin/bash
#
# Usage: rdiff [OPTIONS] signature [BASIS [SIGNATURE]]
#              [OPTIONS] delta SIGNATURE [NEWFILE [DELTA]]
#              [OPTIONS] patch BASIS [DELTA [NEWFILE]]


test -f "$1" || echo "Old file ($1) does not exist!"
test -f "$2" || echo "New file ($2) does not exist!"

echo -n "1. Making signature file ($1.sig) ..."
rdiff signature "$1" "$1.sig" || exit 1
echo " done."

echo -n "2. Making delta file ($1--$2.delta) ..."
rdiff delta "$1.sig" "$2" "$1--$2.delta"
echo " done."

echo "If you want to merge the delta file, you can use"
echo " 'rdiff patch \"$1\" \"$1--$2.delta\" [new-filename]'"
------------------------------------------------------------------------

and used it on these files:

jens     jens     4060907520 Apr  9 03:49 RESCUE_2003-04-10.tar
jens     jens     4300564480 May 12 03:56 RESCUE_2003-05-12.tar

as follows:

        make-rdiff RESCUE_2003-04-10.tar RESCUE_2003-05-12.tar

creating

jens     jens     1211595331 Aug 15 03:27
RESCUE_2003-04-10.tar--RESCUE_2003-05-12.tar.delta
jens     jens     23794392 Aug 14 23:05 RESCUE_2003-04-10.tar.sig

This worked fine. But now merging the delta and the old file into the new
file (as a test) didn't:

rdiff patch RESCUE_2003-04-10.tar \
        RESCUE_2003-04-10.tar--RESCUE_2003-05-12.tar.delta \
        RESCUE_2003-05-12.tar.rdiff-result

produced:

        rdiff: ERROR: (rs_file_copy_cb) seek failed: Invalid argument
        rdiff: ERROR: (rs_job_complete) patch job failed: IO error
        rdiff: ERROR: IO error

using strace, I found

open("RESCUE_2003-04-10.tar", O_RDONLY|O_LARGEFILE) = 3
open("RESCUE_2003-04-10.tar--RESCUE_2003-05-12.tar.delta",
O_RDONLY|O_LARGEFILE) = 4
open("RESCUE_2003-05-12.tar.rdiff-result",
O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 5

then, lots of read(), write(),and _llseek(3, ...) commands, until

read(4, "\0\0\0\203\304\370h\217\203\5\10W\350\"\21\0\0\203\304"..., 12288)
= 12288
read(4, "\213C\30P\350\355\322\377\377\203\304\20\353\10\213\33"..., 4096) =
4096
write(5, "\2\0\0\203\370\2\17\204\304\1\0\0\351\367\1\0\0\203\304"..., 4096)
= 4096
write(5, "C\fP\350h\273\377\377\203\304\20\205\300t\v\213[\4\205"..., 12288)
= 12288
read(4, "\213\215\5\10\211\307\271\6\0\0\0\374\250\0\363\246ud\203"...,
12288) = 12288
read(4, "\312\3T$\34\211P\10\3X\20\3\\$,\211X\f\0038\3|$(\211x\20"..., 4096)
= 4096
_llseek(3, 18446744073467604992, 0x59489dd0, SEEK_SET) = -1 EINVAL (Invalid
argument)
write(2, "rdiff: ERROR: (rs_file_copy_cb) "..., 62) = 62
write(2, "rdiff: ERROR: (rs_job_complete) "..., 59) = 59
write(5, "\203\354\34UWVS\213t$0\211\360\211\362\203\342\3t\26z\17"...,
2458) = 2458
close(5)                                = 0
munmap(0x20a33000, 4096)                = 0
close(4)                                = 0
munmap(0x20a31000, 4096)                = 0
close(3)                                = 0
munmap(0x20a32000, 4096)                = 0
write(2, "rdiff: ERROR: IO error\n", 23) = 23
exit_group(100)                         = ?

_llseek() wants to jump to a cosmically high value, which (of course) fails.
So either there's a bug in rdiff or there's rubbish in the file. (which I
doubt, I haven't restarted this system for months and I've never had data
loss).


All this happened on a duron-650 with 256MB RAM and Debian GNU/Linux
unstable, rdiff-backup .12.1, librsync 0.9.6 and the rdiff executable
within. Oh yes, "python -V" reports version 2.3. I also have explicit
python2.1, python2.2 and python2.3 executables.


Please help ;)



-- 
Jens Benecke (address@hidden)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]