[I took a few days to send this summary as I was waiting for some confirming information from Sun Support.] ****************************************************************************** ORIGINAL QUESTION: ****************************************************************************** I have a DAT-2 tape drive on my SPARCstation-60 which is running Solaris 8. I have five different disk partitions and I have generated a level-0 dump using ufsdump and the non-rewinding device. These five sequential dumps span over three DAT tapes. I wanted to grab something off the tape from the the forth partition using a custom script that basically issue the commands: mt -f /dev/rmt/0c rewind ufsrestore isf 4 /dev/rmt/0c With the first tape in the set installed it begins searching for the 4th dump file. When it gets to the end of the tape it displays the message: Mount volume 2 then enter volume name (default /dev/rmt/0c) I insert the 2nd tape and then have tried the following things: * enter: <CR> * enter: /dev/rmt/0c<CR> * enter: 2<CR> Regardless of what I do, ufsrestore immediately asks for volume 3, then 4, then 5, and so on. It never makes any attempt to read any subsequent tape. What is the proper response to give at this point to get ufsrestore to continue properly. Thanks for your help. ****************************************************************************** ****************************************************************************** SUMMARY: ****************************************************************************** My confusion was the result of making an assumption that the 's' skip option of ufsrestore would be smart enough to keep track of what it was doing as it advanced beyond the end of the current tape and the next one. Apparently that is not true. To extract from a given dump file, you must start by loading the appropriate tape where that dump begins and then advance an appropriate amount to the start of the target dump file. I will give detailed instructions below which will hopefully be useful to others who may have similar questions. This example should highlight the procedure. On my machine I dumped the following five partitions: / /u /v /opt /var onto a series of three DAT tapes using the non-rewinding device /dev/rmt/0cn. These dumps end up located as followed: Tape #1: / /u /v (beginning) Tape #2: /v (conclusion) /opt (beginning) Tape #3: /opt (conclusion) /var Thus, to access a particular partition, first do "mt -f /dev/rmt/0c rewind" to insure the tape is rewound, and then: Partition Load Tape Command ------------- ------------- ---------------------------------- / #1 ufsrestore isf 1 /dev/rmt/0c /u #1 ufsrestore isf 2 /dev/rmt/0c /v #1 ufsrestore isf 3 /dev/rmt/0c /opt #2 ufsrestore isf 2 /dev/rmt/0c /var #3 ufsrestore isf 2 /dev/rmt/0c Note that if you load tapes #2 or #3 and tried: ufsrestore isf 1 /dev/rmt/0c ufsrestore will appropriately complain: "This is not volume 1 of the dump" since these tapes actually start in the middle of a dump file initiated on the previous tape. Justin Stringfellow of Sun UK sent some notes from the SunSolve database. However, when I attempted to repeat the procedure for reading the tapes in "reverse" order as described below, I discovered that you cannot perform tape drive operations in a second window when the original ufsrestore is running as you get "/dev/rmt/0n: Device busy" errors. I confirmed that this is the case with Sun Support and that the instructions appear to be incorrect. Here is how I went about extracting files from a dump in the middle of the tape set that spans tapes. Let's say we want something from the /opt partition which starts on tape #2 and finishes on tape #3. 1: Insert tape #2 into the drive. 2: Make sure the tape is rewound with: mt -f /dev/rmt/0c rewind 3: Access the /opt interactive index: ufsrestore isf 2 /dev/rmt/0c 4: Select the files to be extracted using the normal ufsrestore commands. 5: When you specify "extract", just start with the current volume, which for this dump is "1". (It is actually "tape" #2, but it is "volume" #1 for the /opt partition dump.) Just search the tapes sequentially rather than in reverse order. The dialog is as follows: ufsrestore > extract<CR> You have not read any volumes yet. Unless you know which volume your file(s) are on you should start with the last volume and work towards the first. Specify next volume #: 1<CR> 6: When ufsrestore reaches the end of volume 1, eject the tape and insert tape #3 which is "volume" #2 for this dump. The dialog is: You have read volumes: 1 Specify next volume #: 2<CR> Mount volume 2 then enter volume name (default: /dev/rmt/0c) <CR> 7: When ufsrestore finishes reading the /opt dump, it concludes with the normal messages: set owner/mode for '.'? [yn] y<CR> ufsrestore > quit 8: The tape will rewind (since we didn't use the non-rewinding device). Eject the tape and you're done. I have a set of custom scripts that manage all phases of dump and restore. With this new understanding I will now have to enhance the dump script to parse the output from ufsdump to keep track of and log on which tape each partition dump file begins. Then the restore script will be able to automatically prompt for the correct tape to load in order to access the proper dump. My sincere thanks to the following people who provided quick responses to my question. -- <cypher@punk.net> Rasal Kumarage <rkumarage@qantas.com.au> Jay Lessert <jayl@accelerant.net> Buddy Lumpkin <blumpkin@sun-guru.com> Justin Stringfellow <Justin.Stringfellow@Sun.COM> Vasilis Iliadis <vasilis.iliadis@dienekis.gr> Paul Frederiksen <FrederiP@ritchie.disa.mil> Paul Wilkinson <Paul_Wilkinson@utsglobal.com> Govindaraju P <govindp@wipro.co.in> All of the responses are included below. Regards, -- Jeff C. Jeffery Small CJSA LLC (206) 232-3338 jeff@cjsa.com 7000 E Mercer Way, Mercer Island, WA 98040 ****************************************************************************** ------------------------------------------------------------------------------ ANSWERS RECEIVED: ------------------------------------------------------------------------------ Date: Wed, 5 Sep 2001 18:20:05 GMT From: cypher@punk.net Subject: Re: Problem with ufsrestore Doesn't the output of the ufsdumps indicate (prompting) when a tape was put in during a given dump? If partition 3 dumps on tape 2 and onto tape 3, wouldn't partition 4 be the second file on tape 3? Parsing the ufs output could create the labels you need. ------------------------------------------------------------------------------ Date: Thu, 6 Sep 2001 23:36:10 GMT From: Rasal RKU23 Kumarage <rkumarage@qantas.com.au> Subject: Re: Problem with ufsrestore Hi, Probabaly you can start straight from the tape having the 4th dump & using mt & ufsrestore you can recover the file system. Eg: assume your 4th partition is on 2nd tape & it is the second file. Mount the second tape mt -f /dev/rmt/0cn rewind mt -f /dev/rmt/0cn fsf 2 cd <mount point> ufsrestore -rvf /dev/rmt/0cn ( You may use ufsrestore -tvf /dev/rmt/0cn to read the tape first) Rasal ------------------------------------------------------------------------------ Date: Thu, 6 Sep 2001 16:48:49 -0700 From: Jay Lessert <jayl@accelerant.net> Subject: Re: Problem with ufsrestore I guess I would be amazed if this worked. :-) I think your script is going to have to keep track of which dumps begin on which file of which tape, and then start with *that* tape (with the skip number !=4 in this case). -- Jay Lessert jay_lessert@accelerant.net Accelerant Networks Inc. (voice)1.503.439.3461 Beaverton OR, USA (fax)1.503.466-9472 ------------------------------------------------------------------------------ Date: Thu, 6 Sep 2001 20:46:13 -0700 From: "Buddy Lumpkin" <blumpkin@sun-guru.com> Subject: RE: Problem with ufsrestore Your trying to restore with interactive options ... don't do that! Try this: Let's say the fourth filesystem backed up is /export/home, and the file you want to restore is everything under /export/home/users/foobar. Your restore command will be: ufsrestore xvfs /dev/rmt/0c 4 ./users/foobar When it asks you which tape, just enter tape #1. If that doesn't work, enter #2, etc.. If you want to predict which tape your files will be on, you need to know how big the backups are. One thing to note is that you can fill four tapes with four backups and only the dumps that span from one tape to the next would have a tape #2, if it spans another tape, then there will be a tape #3 and so on... Also, the no-rewind specifier i.e. /dev/rmt/0cn is only needed during backups to keep the tape from rewinding between backups. Hope this helps, --Buddy ------------------------------------------------------------------------------ Date: Fri, 7 Sep 2001 08:26:06 +0100 (BST) From: Justin Stringfellow <Justin.Stringfellow@Sun.COM> Subject: Re: Problem with ufsrestore How to restore dumps that span more than one tape and where there are also multiple dumps on the tapes. For example, using a DAT Autoloader in sequential mode, you have backed up 4 filesystems on 2 tapes as follows: Tape#1 ====== Dump#1 Dump#2 Dump#3 part 1 of 2 ------------------------- ------------------------- -------------------- | Dump | Dump data | | Dump | Dump data | | Dump | Dump data | EOT |Header| | |Header| | |Header| | ------------------------- ------------------------- -------------------- Tape#2 ====== Dump#3 part 2 of 2 Dump#4 -------------------- ------------------------- | Dump | Dump data | | Dump | Dump data | |Header| | |Header| | -------------------- ------------------------- To restore Dump#3, you should: 1) Manually load Tape#1 into the Autoloader 2) Forward the tape to the start of the dump as follows: # mt -f /dev/rmt/0n rewind # mt -f /dev/rmt/0n fsf 2 3) Use the ufsrestore command as follows: # ufsrestore -ivf /dev/rmt/0n ... ufsrestore> add . ... ufsrestore> extract Extract requested files You have not read any volumes yet. Unless you know which volume your file(s) are on you should start with the last volume and work towards the first. Specify next volume #: 4) At this point enter 2, as this dump spans 2 tapes, then manually eject tape#1 and load Tape#2 into the Autoloader. ... Mount volume 1 then enter volume name (default: /dev/rmt/0n) 5) At this point, you should manually , and load Tape#1. 6) To get to the correct place on the tape, you should now go to another window/login on your system position the tape at the start of Dump#3 with: # mt -f /dev/rmt/0n fsf 2 7) Finally, press RETURN to the prompt from ufsrestore to continue the restore. NOTE1: If you position the tape incorrectly, ufsrestore will detect this, and ask you to select another tape. NOTE2: To restore Dump#4, then use must load Tape#2 and foward the tape by one position. You *cannot* load Tape#1, and expect "ufsrestore -ivfs /dev/rmt/0n 3" to autoload Tape#2, as there is no autoloader/jukebox support in Solaris. -- ______ /_____/\ Justin Stringfellow /____ \\ \ Support Engineer /_____\ \\ / Sun Microsystems /_____/ \/ / / Guillemont Park /_____/ / \//\ \_____\//\ / / Tel. : +44 (0)870 6003222 \_____/ / /\ / \_____/ \\ \ \_____\ \\ \_____\/ ------------------------------------------------------------------------------ Date: Fri, 7 Sep 2001 06:59:24 GMT From: vasilis iliadis <vasilis.iliadis@dienekis.gr> Subject: RE: Problem with ufsrestore Try this mt -f /dev/rmt/0c rewind ufsrestore xvfs /dev/rmt/0c 4 Regards Vasilis Iliadis Software Engineer Dienekis Information systems SA 446 Mesogion & Marouli Phone: +301 60 17 382 Fax: +301 60 10 690 e-mail: vasilis.iliadis@dienekis.gr ------------------------------------------------------------------------------ Date: Fri, 7 Sep 2001 08:42:22 -0400 From: "Frederiksen, Paul" <FrederiP@ritchie.disa.mil> Subject: RE: Problem with ufsrestore maybe just /dev/rmt/0 ? ------------------------------------------------------------------------------ Date: Fri, 07 Sep 2001 21:07:38 +0200 From: Paul Wilkinson <Paul_Wilkinson@utsglobal.com> Subject: Re: Problem with ufsrestore I'm sure you have the answer by now, but just in case..... I think the man page is inaccurate in some respects, if you want the 4th file you need to skip 3 which will position you at the beginning of the 4th file. Have you tried forward spacing manually, them restoring. mt -f /dev/rmt/0n fsf 3; ufsrestore ivf /dev/rmt/0n Paul. ------------------------------------------------------------------------------ Date: Sat, 8 Sep 2001 10:11:32 GMT From: "Govindaraju P (OCS-DELRO-AVS)" <govindp@wipro.co.in> Subject: Ufsrestore Hi jeff, I too had same problem with DLT4000 drives. It keeps asking volume name.It clicked for me, you can try this option. Load recommended patches for sol8. Rewind the tape without non rewind device file Mount with non rewind device use non rewind file for ufsrestore. It is advisable that you can rewind both the volumes before use then try step 2 and 3. 1.mt -f /dev/rmt/0c rewind 2.mt -f /dev/rmt/ocn stat 3.ufsrestore isf 4 /dev/rmt/0cn Regards, Govind. ------------------------------------------------------------------------------Received on Tue Sep 11 23:11:43 2001
This archive was generated by hypermail 2.1.8 : Wed Mar 23 2016 - 16:32:30 EDT