LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris and OpenSolaris.
General Sun, SunOS and Sparc related questions also go here.

Notices

Reply
 
Search this Thread
Old 11-08-2007, 11:44 AM   #1
agfa_109
LQ Newbie
 
Registered: Nov 2007
Posts: 6

Rep: Reputation: 0
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
 
Old 11-08-2007, 06:31 PM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,522

Rep: Reputation: 365Reputation: 365Reputation: 365Reputation: 365
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.
 
Old 11-08-2007, 08:12 PM   #3
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,189

Rep: Reputation: 105Reputation: 105
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.

Last edited by choogendyk; 11-08-2007 at 08:13 PM.
 
Old 11-09-2007, 12:46 PM   #4
agfa_109
LQ Newbie
 
Registered: Nov 2007
Posts: 6

Original Poster
Rep: Reputation: 0
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
 
Old 11-09-2007, 05:54 PM   #5
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,189

Rep: Reputation: 105Reputation: 105
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.
 
Old 11-12-2007, 09:07 AM   #6
agfa_109
LQ Newbie
 
Registered: Nov 2007
Posts: 6

Original Poster
Rep: Reputation: 0
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
 
Old 11-12-2007, 09:45 AM   #7
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,189

Rep: Reputation: 105Reputation: 105
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.
 
Old 11-12-2007, 11:03 AM   #8
agfa_109
LQ Newbie
 
Registered: Nov 2007
Posts: 6

Original Poster
Rep: Reputation: 0
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
 
Old 11-13-2007, 07:20 AM   #9
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,189

Rep: Reputation: 105Reputation: 105
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
 
Old 11-13-2007, 12:29 PM   #10
agfa_109
LQ Newbie
 
Registered: Nov 2007
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks for the suggestion. I'll surely test with both Amanda and amrecover.

pt
 
  


Reply

Tags
cron, mt, solaris


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ufsdump explained tekmann33 Linux - Newbie 1 10-30-2007 11:06 AM
ufsdump manoj.linux Solaris / OpenSolaris 2 09-15-2007 11:34 AM
great solaris website for newbies http://solaris-x86.org/ feetyouwell Solaris / OpenSolaris 2 12-06-2006 01:14 AM
ufsdump linuxtesting2 Solaris / OpenSolaris 7 06-16-2006 11:23 AM
The ufsdump command Gins Linux - General 3 08-22-2005 08:16 PM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration