LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (http://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   ufsdump and ufsrestore on solaris 10 (http://www.linuxquestions.org/questions/solaris-opensolaris-20/ufsdump-and-ufsrestore-on-solaris-10-a-598080/)

agfa_109 11-08-2007 10:44 AM

ufsdump and ufsrestore on solaris 10
 
I need help restore files from the ufsdump backup. I have two directories (/backup/web and /backup/share) that is set to run full backup on ufsdump with cron every morning and it takes a single tape and host is solaris 10. I'm trying to do the restore from the backups and have a hard time getting the file using ufsrestore. I use ufsrestore to check what's on the tape and I could only find either one of the directories (web or share) but not both on the tapes. For example, I have a full backup for yesterday and if I check the tape using ufsrestore, I'd only be able to see contents of /backup/web but not /backup/share. And I'd remove that tape and use the tape for today's backup and I'd only see only /backup/share but /backup/web is not there.

As there are two directories in the backup tape,
Here's the cron:

30 8 * * 1-6 /usr/sbin/umount -f /backup/web;
/usr/sbin/ufsdump -0fu /dev/rmt/0cn /dev/dsk/c0t1d0s0 2>&1 | mailx -s "web is done" root@localhost;
/usr/sbin/mount /dev/dsk/c0t1d0s0 /backup/web

30 10 * * 1-6 /usr/sbin/umount -f /backup/shares;
/usr/sbin/ufsdump -0fou /dev/rmt/0cn /dev/dsk/c0t2d0s3 2>&1 | mailx -s "shares is done" root@localhost;
/usr/sbin/mount /dev/dsk/c0t2d0s3 /backup/shares

I'd usually use ufsrestore interactive mode and check on the tape, I
found there are options to rewind and move to different level on a
single tape for the different volume/folder but I can't get to work any
of that. I have tried to do ufsrestore using fsf and rwd options on the
tape, but didn't get anywhere other than error messages.

# ufsrestore -i
ufsrestore > ls
ufsrestore > what

My another question is what are the differences on the device paths. My guess is they are all referring to the same device and is the difference on the letter tells how the device will behave/operates??
/dev/rmt/0
/dev/rmt/0c
/dev/rmt/0cn

I'm totally new on this subject and please help me with this problem. Please send me any email if you need more information from me.

Thank you.

phothet

jlliagre 11-08-2007 05:31 PM

I believe rmt/0 is the regular device, rmt/0c is the same one but with compression on and rmt/0cn has both compression and no-rewind set.

I suspect you read only one of the backups because they are sequential on the tape. You need to use the mt command to move from one "session" to the other.

choogendyk 11-08-2007 07:12 PM

right. do a `man mt`. to get at the second ufsdump on the tape, do

Code:

# mt rewind
# mt status
# mt fsf 1
# mt status
# ufsrestore -i

# mt status

the extra status commands are just so you see what's up with the tape. The default device you get with mt is the rewinding device, /dev/rmt/0. So, after your ufsrestore it will be back at the beginning.

I'm assuming you put the tape in some time before the backups are to run, then those to ufsdumps go to the tape in sequence (/dev/rmt/0cn is compressed and non-rewinding), and then you eject the tape the next day and save it. So it has two dumps on it.

agfa_109 11-09-2007 11:46 AM

Hi guys, thanks for the reply. Now, I kinda get the idea of how it keeps all the files on different session and trace both files.

I also tried this and it seemed to work.

mt -f /dev/rmt/0cn rewind
ufsrestore -ifs /dev/rmt/0cn 1
mt status

mt -f /dev/rmt/0cn rewind
ufsrestore -ifs /dev/rmt/0cn 2
mt status

I'm not sure if that's the proper way and also I noticed during the recovery, even the blank files took quite awhile on ufsrestore.

One thing that I saw while I'm playing around with "mt" and "ufsrestore" is I noticed there are some old backup files from several months ago not just those two backup directories that I mentioned on the same tape. Is there any way that I could view all of those backups (old or new or current) from the tape as a list? Since that cronjob and recovery process have been going on long before I got here and I have no idea of what's been done or what's actually being backuped on that same tape earlier time. Maybe there's still some space left?? Please help me out how I could view how many sessions, backups or files are in there? As of now, I'm also digging more onto the "mt" and see if I can find similar commands to dig those old files.


Thank you.

pt

choogendyk 11-09-2007 04:54 PM

the `mt fsf 1` takes you forward one file.

the `mt status` tells you where you are.

So, you could just keep going forward until you get to the end. If you do a `ufsrestore -i` is will rewind after it is done. Perhaps if you `ufsrestore -if /dev/rmt/0cn` it will not rewind when it is done. Check to see by using `mt status`.

That should allow you to get at whatever is on the tape.

agfa_109 11-12-2007 08:07 AM

Thanks for all your help. I finally got it now. I'm kinda surprised about the backup speed with ufsrestore. I can't believe it's that slow.

pt

choogendyk 11-12-2007 08:45 AM

slow as compared to what?

I skimmed back through the thread and didn't see what kind of tape was being used or any comments about drives, shares or file systems. If you are doing it to dds, that can be slow. If you are doing it from nfs, that can be slow. Anything pulled from the network gets complicated by possible network issues. It can also be affected by the numbers of files -- a gazillion small files as compared to a few large files. If you want comparisons, you could try gtar and dd and see how fast they can drive your tape.

agfa_109 11-12-2007 10:03 AM

Sorry about my incomplete info. The storage box is solaris 10/ultra 5 and all the data from the main server are dumped overnight onto that box with rsync/nfs, I believe. And every morning, all those data stored overnight are store on the tape with ufsdump. The storage box is connected (scsi) to the backup ibm 3580 ultrium tape drive and stores on ibm lto tape. As I'm still on the learning curves of doing backups, I'm trying to get as much info as whats/hows/whys of different methods.

To answer your question "slow as compared to what" is I also have to run the backup with networker on solaris boxes with several clients on same tape drives/tapes (ibm ultrim/lto tapes), restore seems a little faster with networker back to the client. But taking about 30min on a file with a few bytes on the restore is a little too much. I know networker is not free and ufsrestore is a free tool and performance may be different.

Sorry if I sound like whinning but I'm only trying to see if there's any any way/setting/switches/options on the command line to make the ufsrestore backup goes a little faster.

Thanks

pt

choogendyk 11-13-2007 06:20 AM

So you have a reasonably good comparison, with the hardware all the same.

One difference is that you have multiple backup streams in netbackup, and appear to have consolidated that into a single backup stream in ufsdump. If the data being backed up is comparable, I'm going to take a flying wild guess that netbackup is thus able to position to tape to one of those backup streams and read into it to find the file, while ufsdump has to read through the whole consolidated backup looking for the file.

If you could separate out a comparable backup stream, you might find that netbackup and ufsdump are more comparable.

Interesting would be to use Amanda with ufsdump to do what netbackup is doing, and then see what amrecover does for performance. I'm not sure how amrecover handles the tape, but I think it should be able to reposition to a particular disk list entry and find the file out of that. The bonus would be that Amanda is open source.

http://www.linuxquestions.org/bookmarks/tags/backup

agfa_109 11-13-2007 11:29 AM

Thanks for the suggestion. I'll surely test with both Amanda and amrecover.

pt


All times are GMT -5. The time now is 02:01 PM.