I used dump and restore on a single machine and that all works as expected.
No my machine has crashed/stolen/burned, so I have recreated a new one. I would expect that I can use the restore command to get all my data back, but I can't. Restore just says ". is not on the tape" The new disk has is newly formatted (ext3).
What do I do wrong? I'm just trying this out to see what happens when I really need my backups. My original machine is still around....
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
To get a qualified answer, you should exactly tell us how you performed the dump/restore. (exact commandline with parameters)
It's way more difficult to guess, what you might have typed in, that might have caused the problem.
Though it is likely, that you specified the backup file or tape device wrong. But give us your commandlines and we might be able to help you.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
So a compressed level 0 dump to a file that resides on a mounted machine (NFS). (I used NFS and not the host:/file syntax)
I can't recall 100% for sure whether this was the exact command line. I just try to do a simple full backup. And if I do a restore with this file on the same machine/disk it works:
restore -i -f /mnt/duif/arend_dump.gz
If I do the same command on a different machine, it tells me: ". is not on the tape"
Since I expect this to be common usage of restore (not having the original disk around, due to a crash), it must be that I missed a very obvious thing. I just read the documentation again and found the -r argument. I'm starting to believe that this is the switch I should have used. I can't try since the machines are on my work. Would this also mean that I can either extract single files to the original filesystem (-i switch), or a full backup to a clean, new one (-r switch)?
Thanks for your help
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
> If I do the same command on a different machine, it tells me: ". is not on the tape"
The obvious question is what is this different machine running ? Linux ? Some other UNIX ? With what version of restore ?
As for the restore switch, you basically have -r to restore an entire dump into a directory, -i to have the interactive shell which let you select a subset of the dump to restore, -x to restore a subset as told on the command line.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Exactly the same machine/OS/version.
Restore version 0.4b39 (OS RH fedora Core 3)
Is there a spossibility that it has to do with storing by using an NFS file?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No, using NFS shouldn't be a problem, if NFS is working correctly of course...
Try to copy the file locally to the other host and see if it works better. You could also run restore under strace and see if something goes wrong with the 'read' calls.
But anyway, something must be different between the two configurations, because if restore is the same version I cannot see how it could succeed in one case but fail in the other one.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm really lost. As a quick demo I dumped the boot partition of my server called arend (/boot). The dump is run on server arend and the dumpfile is placed on eend (using ssh this time)
At the end is follows an exact replay of the commands.
The strace output for a restore is hard to compare (at least for me). The thing that I noticed is the following:
On arend I get a corrent restore:
open("/backup/arend_dsa1", O_RDONLY|O_LARGEFILE) = 3
On eend I get with a wrong restore:
open(".", O_RDONLY) = 3
open("/mnt/eend/arend_dsa1", O_RDONLY|O_LARGEFILE) = 4
(so one additonal open system call at the beginning)
The file is local on eend. So both the restore command and the file are on the same machine, but nothing is seen.
[root@arend root]# export RSH=ssh
[root@arend root]# dump -0 -z -f eend:/backup/arend_dsa1 /dev/sda1
DUMP: Connection to eend established.
DUMP: Date of this level 0 dump: Mon Apr 4 21:24:27 2005
DUMP: Dumping /dev/sda1 (/boot) to /backup/arend_dsa1 on host eend
DUMP: Label: /boot
DUMP: Writing 10 Kilobyte records
DUMP: Compressing output at compression level 2 (zlib)
DUMP: mapping (Pass I) [regular files]
DUMP: mapping (Pass II) [directories]
DUMP: estimated 3410 blocks.
DUMP: Volume 1 started with block 1 at: Mon Apr 4 21:24:27 2005
DUMP: dumping (Pass III) [directories]
DUMP: dumping (Pass IV) [regular files]
DUMP: Closing /backup/arend_dsa1
DUMP: Volume 1 completed at: Mon Apr 4 21:24:29 2005
DUMP: Volume 1 took 0:00:02
DUMP: Volume 1 transfer rate: 1388 kB/s
DUMP: Volume 1 3460kB uncompressed, 2777kB compressed, 1.246:1
DUMP: 3460 blocks (3.38MB) on 1 volume(s)
DUMP: finished in 2 seconds, throughput 1730 kBytes/sec
DUMP: Date of this level 0 dump: Mon Apr 4 21:24:27 2005
DUMP: Date this dump completed: Mon Apr 4 21:24:29 2005
DUMP: Average transfer rate: 1388 kB/s
DUMP: Wrote 3460kB uncompressed, 2777kB compressed, 1.246:1
DUMP: DUMP IS DONE
[root@arend root]# restore -i -f /mnt/eend/arend_dsa1
Dump tape is compressed.
restore > ls
.:
System.map-2.6.9-1.667 grub/ lost+found/
config-2.6.9-1.667 initrd-2.6.9-1.667.img vmlinuz-2.6.9-1.667
restore > q
[root@arend root]# ssh eend
Last login: Mon Apr 4 21:06:34 2005 from duif
[root@eend ~]# restore -i -f /backup/arend_dsa1
Dump tape is compressed.
. is not on the tape
Root directory is not on tape
abort? [yn] y
dump core? [yn] n
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Oops, I mixed up the strace output. The failing restore only has one read call where the proper one has two.
I tried the restore on another machine (duif) and this restore worked correct. So it appears that only the machine I do the dump to (storage server) is not able to extract the content (?..). I tried to make a dump and restore of this server (eend) and this backup works correctly with all machines. Any suggestion how to debug?
Of course this whole excersise is to make sure that I can use my dump when _really_ needed.
Again, thanks for you help
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This additionnal open('.') confirms my hypothesis: this call was added only in restore 0.4b39, so if it is missing from your strace it means that you are using an older version of restore.
Verify this by executing, on the storage server, restore without any arguments, this will tell you the version number, which I suspect is a bit old.
Upgrading dump/restore on the storage server should hopefuly solve your problem.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The restore works and the only thing I changed in the mean time was do an up2date. This machine I just forgot to update..... I only checked the version of the dump on the server and assumed....
Thanks for helping me out on this. From now on my backups are done with dump and restore and I am confident that I know how to recover in case of a disaster!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I used dump and restore on a single machine and that all works as expected.
No my machine has crashed/stolen/burned, so I have recreated a new one. I would expect that I can use the restore command to get all my data back, but I can't. Restore just says ". is not on the tape" The new disk has is newly formatted (ext3).
What do I do wrong? I'm just trying this out to see what happens when I really need my backups. My original machine is still around....
To get a qualified answer, you should exactly tell us how you performed the dump/restore. (exact commandline with parameters)
It's way more difficult to guess, what you might have typed in, that might have caused the problem.
Though it is likely, that you specified the backup file or tape device wrong. But give us your commandlines and we might be able to help you.
dump -0uz /dev/Volume00/root -f /mnt/duif/arend_dump.gz
So a compressed level 0 dump to a file that resides on a mounted machine (NFS). (I used NFS and not the host:/file syntax)
I can't recall 100% for sure whether this was the exact command line. I just try to do a simple full backup. And if I do a restore with this file on the same machine/disk it works:
restore -i -f /mnt/duif/arend_dump.gz
If I do the same command on a different machine, it tells me: ". is not on the tape"
Since I expect this to be common usage of restore (not having the original disk around, due to a crash), it must be that I missed a very obvious thing. I just read the documentation again and found the -r argument. I'm starting to believe that this is the switch I should have used. I can't try since the machines are on my work. Would this also mean that I can either extract single files to the original filesystem (-i switch), or a full backup to a clean, new one (-r switch)?
Thanks for your help
> If I do the same command on a different machine, it tells me: ". is not on the tape"
The obvious question is what is this different machine running ? Linux ? Some other UNIX ? With what version of restore ?
As for the restore switch, you basically have -r to restore an entire dump into a directory, -i to have the interactive shell which let you select a subset of the dump to restore, -x to restore a subset as told on the command line.
Exactly the same machine/OS/version.
Restore version 0.4b39 (OS RH fedora Core 3)
Is there a spossibility that it has to do with storing by using an NFS file?
No, using NFS shouldn't be a problem, if NFS is working correctly of course...
Try to copy the file locally to the other host and see if it works better. You could also run restore under strace and see if something goes wrong with the 'read' calls.
But anyway, something must be different between the two configurations, because if restore is the same version I cannot see how it could succeed in one case but fail in the other one.
I'm really lost. As a quick demo I dumped the boot partition of my server called arend (/boot). The dump is run on server arend and the dumpfile is placed on eend (using ssh this time)
At the end is follows an exact replay of the commands.
The strace output for a restore is hard to compare (at least for me). The thing that I noticed is the following:
On arend I get a corrent restore:
open("/backup/arend_dsa1", O_RDONLY|O_LARGEFILE) = 3
On eend I get with a wrong restore:
open(".", O_RDONLY) = 3
open("/mnt/eend/arend_dsa1", O_RDONLY|O_LARGEFILE) = 4
(so one additonal open system call at the beginning)
The file is local on eend. So both the restore command and the file are on the same machine, but nothing is seen.
[root@arend root]# export RSH=ssh
[root@arend root]# dump -0 -z -f eend:/backup/arend_dsa1 /dev/sda1
DUMP: Connection to eend established.
DUMP: Date of this level 0 dump: Mon Apr 4 21:24:27 2005
DUMP: Dumping /dev/sda1 (/boot) to /backup/arend_dsa1 on host eend
DUMP: Label: /boot
DUMP: Writing 10 Kilobyte records
DUMP: Compressing output at compression level 2 (zlib)
DUMP: mapping (Pass I) [regular files]
DUMP: mapping (Pass II) [directories]
DUMP: estimated 3410 blocks.
DUMP: Volume 1 started with block 1 at: Mon Apr 4 21:24:27 2005
DUMP: dumping (Pass III) [directories]
DUMP: dumping (Pass IV) [regular files]
DUMP: Closing /backup/arend_dsa1
DUMP: Volume 1 completed at: Mon Apr 4 21:24:29 2005
DUMP: Volume 1 took 0:00:02
DUMP: Volume 1 transfer rate: 1388 kB/s
DUMP: Volume 1 3460kB uncompressed, 2777kB compressed, 1.246:1
DUMP: 3460 blocks (3.38MB) on 1 volume(s)
DUMP: finished in 2 seconds, throughput 1730 kBytes/sec
DUMP: Date of this level 0 dump: Mon Apr 4 21:24:27 2005
DUMP: Date this dump completed: Mon Apr 4 21:24:29 2005
DUMP: Average transfer rate: 1388 kB/s
DUMP: Wrote 3460kB uncompressed, 2777kB compressed, 1.246:1
DUMP: DUMP IS DONE
[root@arend root]# restore -i -f /mnt/eend/arend_dsa1
Dump tape is compressed.
restore > ls
.:
System.map-2.6.9-1.667 grub/ lost+found/
config-2.6.9-1.667 initrd-2.6.9-1.667.img vmlinuz-2.6.9-1.667
restore > q
[root@arend root]# ssh eend
Last login: Mon Apr 4 21:06:34 2005 from duif
[root@eend ~]# restore -i -f /backup/arend_dsa1
Dump tape is compressed.
. is not on the tape
Root directory is not on tape
abort? [yn] y
dump core? [yn] n
Oops, I mixed up the strace output. The failing restore only has one read call where the proper one has two.
I tried the restore on another machine (duif) and this restore worked correct. So it appears that only the machine I do the dump to (storage server) is not able to extract the content (?..). I tried to make a dump and restore of this server (eend) and this backup works correctly with all machines. Any suggestion how to debug?
Of course this whole excersise is to make sure that I can use my dump when _really_ needed.
Again, thanks for you help
This additionnal open('.') confirms my hypothesis: this call was added only in restore 0.4b39, so if it is missing from your strace it means that you are using an older version of restore.
Verify this by executing, on the storage server, restore without any arguments, this will tell you the version number, which I suspect is a bit old.
Upgrading dump/restore on the storage server should hopefuly solve your problem.
Hi Stelian
You must be right...
The restore works and the only thing I changed in the mean time was do an up2date. This machine I just forgot to update..... I only checked the version of the dump on the server and assumed....
Thanks for helping me out on this. From now on my backups are done with dump and restore and I am confident that I know how to recover in case of a disaster!