Subject: Re: Problems with restore
To: Juergen Hannken-Illjes <hannken@eis.cs.tu-bs.de>
From: Teemu Rinta-aho <teemu@rinta-aho.org>
List: netbsd-users
Date: 07/01/2007 12:39:32
Juergen Hannken-Illjes wrote:
> On Sat, Jun 30, 2007 at 09:01:18PM +0300, Teemu Rinta-aho wrote:
>> Juergen Hannken-Illjes wrote:
>>> On Fri, Jun 29, 2007 at 09:58:27PM +0300, Teemu Rinta-aho wrote:
>>>> Hi all,
>>>>
>>>> I have been using tar for a while to make backups. Now I'm
>>>> planning to switch over to using dump.
>>>>
>>>> I planned to write multiple DVD-R sized volumes into separate
>>>> files, which I'll burn on DVD-R discs.
>>>>
>>>> However, while running tests, I noticed that single volume
>>>> dumps cause no problems when restoring, even directly from
>>>> a DVD. But, when I create a multi-volume dump, I always
>>>> get these errors when restoring:
>>>>
>>>> 	resync restore, skipped XXX blocks
>>>>
>>>> I tested the same on Linux, with the same ~100MB test
>>>> directory, and I get the problems whenever I have more
>>>> than one volume.
>>>>
>>>> This is so old and tested software that I'm quite
>>>> certain the problem is the user.. Please help me :-)
>>> How did you create the dump volumes?
>> dump -0 -B 60000 -e -f d1,d2 dir
>>
>> (Where dir is roughly 100MB, tried the same both on
>> ext3 in Linux and on ffs (raidframe) on NetBSD 4.0_BETA2).
>>
>> I also tried with "-b 2" option but no difference.
>>
>> If I change value of -B, I get errors in different files.
>>
>> If I try 'dump -0 -a -f d1 dir', I have no problems.
>>
>> I saw somewhere that there has been problems when dump
>> just changes the volume immediately when the specified
>> size is reached, and the inode record gets stored on
>> the first volume while the file is stored on the second
>> one. Which is kind of dum_b_ :-)
>>
>> I could create a single volume and split it, but I'd
>> like to be able to restore directly from DVDs without
>> intermediate copying & catting...
> 
> Sorry, can't reproduce.  Running
> 
> 	dump -0 -B 30000 -f f0,f1,f2,f3 /path
> 	restore -rN -f f0
> 
> I get
> 
> 	...
> 	DUMP: Volume 1 started at: Sun Jul  1 10:52:21 2007
> 	DUMP: dumping (Pass III) [directories]
> 	DUMP: dumping (Pass IV) [regular files]
> 	DUMP: Closing f0
> 	DUMP: Volume 1 completed at: Sun Jul  1 10:52:25 2007
> 	DUMP: Volume 1 took 0:00:04
> 	DUMP: Volume 1 transfer rate: 7500 KB/s
> 	DUMP: Dumping volume 2 on f1
> 	DUMP: Volume 2 started at: Sun Jul  1 10:52:25 2007
> 	DUMP: Volume 2 begins with blocks from inode 2183344
> 	DUMP: Closing f1
> 	DUMP: Volume 2 completed at: Sun Jul  1 10:52:26 2007
> 	DUMP: Volume 2 took 0:00:01
> 	DUMP: Volume 2 transfer rate: 30000 KB/s
> 	DUMP: Dumping volume 3 on f2
> 	...
> 
> 	...
> 	Mount tape volume 2
> 	Enter ``none'' if there are no more tapes
> 	otherwise enter tape name (default: f0) f1
> 	Mount tape volume 3
> 	Enter ``none'' if there are no more tapes
> 	otherwise enter tape name (default: f1) f2
> 	...
> 

Ah, I guess the problem was that in interactive mode I mounted
the wrong files, I wasn't careful enough to read the instructions,
and thought one volume needs to be mounted only once!

I guess those "resync restore, skipped XX blocks" are quite normal,
and there's nothing wrong with the system(s)?

Thanks for your reproducing efforts! :-)

[root@server test]# restore -i -f d1
restore > ls
.:
tmp/

restore > add tmp
restore > extract
You have not read any tapes yet.
Unless you know which volume your file(s) are on you should start
with the last volume and work towards the first.
(Use 1 for the first volume/tape, etc.)
Specify next volume #: 3
Mount tape volume 3
Enter ``none'' if there are no more tapes
otherwise enter tape name (default: d1) d3
resync restore, skipped 139 blocks
You have read volumes: 3
Specify next volume #: 2
Mount tape volume 2
Enter ``none'' if there are no more tapes
otherwise enter tape name (default: d3) d2
resync restore, skipped 212 blocks
Mount tape volume 3
Enter ``none'' if there are no more tapes
otherwise enter tape name (default: d2) d3
You have read volumes: 2, 3
Specify next volume #: 1
Mount tape volume 1
Enter ``none'' if there are no more tapes
otherwise enter tape name (default: d3) d1
resync restore, skipped 2769 blocks
resync restore, skipped 2547 blocks
Mount tape volume 2
Enter ``none'' if there are no more tapes
otherwise enter tape name (default: d1) d2
restore > quit
[root@server test]# ls -l
total 102354
-rw-r--r--  1 root  wheel  40960000 Jul  1 12:23 d1
-rw-r--r--  1 root  wheel  40960000 Jul  1 12:23 d2
-rw-r--r--  1 root  wheel  22835200 Jul  1 12:23 d3
drwxrwxrwx  3 root  wheel       512 Jun 29 19:31 tmp
[root@server test]# diff -r tmp ../tmp
[root@server test]#

BR,
Teemu