Since you are using the "no rewind" tape device, did you rewind the tape before attempting to do the restore?

You need to track the "files" that are at what position on the tape, where each "file" is a dump set. Given the two commands you ran, the dump of /var/log is the first file, and the dump of /home is the second file. After the two dumps, the tape is positioned at the end of the second file, ready to write number three.

If you want to restore something from the first file, you need to rewind the tape first:

    mt -f /dev/nst0 rewind

Then issue your restore as usual. If you want to restore from the second file (and you are CERTAIN you know where you are on the tape), you can skip forward or backwards X files by using either:

    mt -f /dev/nst0 fsf X (for forward)
    mt -f /dev/nst0 bsf X (for backwards)

Since I'm never CERTAIN where I might be on a tape, I always rewind, then skip forward. So if I wanted the second file:

    mt -f /dev/nst0 rewind
    mt -f /dev/nst0 fsf 1

and then do the restore.

Note that if you intend to write more files to the tape, you need to position the tape after the last file, or it will overwrite files from the position it is already in - and anything after that is in general lost (even though you may not have actually overwritten the data in a later file).

Looks like mt in Linux has added a few shortcuts:

    mt -f /dev/nst0 asf X

will do a rewind and then skip forward X files (helpful to think of the files as numbered starting at 0, so X is the file number itself)

    mt -f /dev/nst0 eom

should bring you to the end of the last file (to append more).



Scott Ehrlich wrote:
So I recently installed an Overland Arcvault 12 tape library on a server to back up /var/log/ and /home. The server is an out-of-box RHEL 5 install, with all packages selected, in an isolated lan, with no package updates. Also, this is a live server that cannot be brought down for backups, and some files may be actively in use during the dump - just gotta live with it.

Since I know EL5 and C5 are the same, and the level of support I get from RH is actually less effective and slower than resources such as this list, I'm looking here, first.

Up to this point I was backing up to a USB-mounted external 1 TB hard drive.

I was using a script containing:

/sbin/dump -0v -z2 -f /media/usb_drive/dump0 /home

I played with restore on that, and it tested fine.

For the tape, I thought it would be nice to add /var/log (should have done it before, but didn't think of it...)

Trying to adapt the knowledge to a tape library...

/sbin/dump -0 -v -z2 -f /dev/nst0 /var/log
/sbin/dump -0u -v -z2 -f /dev/nst0 /home

I have a cron job that dumps the results to /var/log/dump.log, and a review of the log file claims all went well. Now for the restore...

I just tried playing with different options of restore, but could not successfully restore anything. I ensured I was in a scratch area so as to hopefully not overwrite current files.

What is the proper procedure for dumping and restoring now? Should I be dumping to /dev/nst0/dump? What restore commands would I use to recall a file?

I'd like to keep things as simple as possible - people have suggested legato and amanda, but for now, I would think/hope dump and restore would work.

Thanks.

Scott

_______________________________________________
bblisa mailing list
[email protected]
http://www.bblisa.org/mailman/listinfo/bblisa

_______________________________________________
bblisa mailing list
[email protected]
http://www.bblisa.org/mailman/listinfo/bblisa

Reply via email to