Can ufsdump create files that have a .vtoc and .dmp extension?
Hello,
I was handed the job of restoring a drive on a old Sun Micro server running Solaris 8. The person who created the backup files told me I would need to use UFSrestore to restore the drive. I have read about everything on ufsrestore that is on this forum and have a decent grasp on how it works, but I still haven't had any luck restoring the drive.
I created my own ufsdump of an unimportant directory and restored it to just to make sure I wasn't missing anything. One thing that I noticed is that ufsdump stored the directory as a singular file with a .ufs extension. The files I was given have multiple files for each partition. Is a list of the files they gave me.
I understand that the .tar file is just a compressed group of file and directories that is completely separate. Is it possible for ufsrestore to have .vtoc and .dmp extensions? If not, does anyone know of a tool that might be used to create backups with these extensions?
Thank you!
Curt
Last edited by jim mcnamara; 08-19-2016 at 08:10 PM..
Reason: code tags
I would expect that the .dmp files are ufsdump files and the .vtoc files are backups of the partition tables (vtoc=virtual table of contents).
Any sysadmin knows that if a drive fails, not only do you need the data (backup) but also the partition layout of the drive. Otherwise you have to guess the partition size(s), then you get them wrong, and the restore operation fills up the filesystem.
There is only one vtoc per physical drive. How many physical drives are there in the system?
If you look at the sizes of the files I would think the .dmp files are the actual backup and therefore maybe large (depending on how much data was on the filesystem) and the .vtoc files very small and readable with 'cat'.
The sysadmin might well have created a script which read the vtoc and wrote it out to a file (.vtoc) and then snapshot the filesystem (fssnap), and then dumped it (ufsdump). So although ufsdump does not create files containing the vtoc a script could be used to do that all in one go.
Thanks for taking the time to reply. I have continued to work on it with no success.
Jim- Thanks for the tip about the file command. You were correct and the .dmp files are in ufs dump format.
It helps to know that I'm at least on the right road.
Hicksd8- I think you are correct about the .vtoc files being the partitions table of contents. They are smaller, but not as small as I expected.
Don't pay attention to the dates, I'm booted from a cdrom copy of solaris 8 in single user mode at the moment.
I have two drives in the system I am working on, but I can only guess there were two drives in the other server that crashed. Unfortunately, I wasn't there when it happened, and they had already gotten rid of the old hardware.
I tried to use the cat command to read the .vtoc file but it just spit out a bunch of junk.
Thanks for the tips, but so far I haven't had much luck getting ufsrestore to work on the .dmp files.
I'll update today as I try again with the exact commands I'm using. I am by no means a sysadmin, so there is a great possibility I'm doing things wrong.
Curt,
Moderator's Comments:
Please use CODE tags as required by forum rules!
---------- Post updated at 10:58 AM ---------- Previous update was at 08:27 AM ----------
These are the instructions I am currently working from. -removed link for lack of posts-
I'm not sure if the forum will allow outside links, do I'll go through step by step what I am doing and why I am modifying parts.
Step 1. Boot server from cdrom in single user mode.
Step 2. Create a partition for the drive I am trying to restore to. Side note: I have already repartitioned the drive and created a new file system on it.
Step 3. Mount the drive to that directory.
Step 4. Next I am mounting a second hard drive on the system with the backup files in it to restore from. Side note: I tried to do this from a thumb drive and recieved an error. I also burned the backup files to a cd, but solaris 8 will not read them. I also tried to burn it from multiple computers like other help forums suggested to no avail.
Both devices mounted successfully.
Step 5 Execute the ufsrestore command. I may be doing this wrong because I dont really understand what the individual parts of the pipeline function are doing.
Output:
As you can see below it just created another dump file in the root directory. The /usr is from where I tried to do this yesterday and it kept the directory structure the dump file came from which was /usr/home. It didnt unpack those files either, just created a dump file there.
I think I am creating a dump instead of restoring one.
---------- Post updated at 12:15 PM ---------- Previous update was at 10:58 AM ----------
I went ahead and tried to restore the .dmp file that is on the target HDD just to see what would happen. Below is the error I have gotten when trying to restore it in the past from the target disk.
Last edited by RudiC; 08-23-2016 at 03:42 PM..
Reason: Added CODE tags.
You are demonstrating some knowledge here but it's difficult for us to judge whether you know the steps to take. Therefore, at a risk of telling you stuff you already know (for which I apologise) I'm going to start from ground zero on a disaster recovery of Solaris 8 using new hard drives.
Firstly though, if you boot into single user as you did, you should be able to verify the .dmp files as proper ufs dumps by using just the ufsrestore command with the t option. This should output a list of files in the archive(s).
Now, if you're working with brand new hard drives, if now already labelled, you will need to write Sun label. You will probably need to invoke the format command in expert mode to do that:
The next step will be to write a vtoc (otherwise known as a partition table) to the disk. You do that using either 'format' (no expert mode required) to set it manually (long-hand) or 'fmthard' if you had a prior .vtoc file that made sense. Remember that slice 2 shows the capacity of the whole drive which you do NOT changed. Slices must NOT overlap.
Next, now you have a slice that you want to restore a ufsdump to you need to make a filesystem on that slice using:
Next, you now mount that slice on a mount point using the 'mount' command. Changing into that directory you should find only a 'lost+found' directory; nothing else.
Remaining in that directory you then just ufsrestore using the x (extract) option the whole .dmp file into the filesystem you've just mounted.
That's it.
If you are restoring a boot disk then you will also need to write out the 'bootblk'. Search this forum or Google for how to do that (and post back here if you need help).
I hope that helps but, as I say, it's difficult to judge your knowledge level. Just post back here and post your further questions. There's plenty of help available here.
---------- Post updated 24-08-16 at 10:05 AM ---------- Previous update was 23-08-16 at 09:42 PM ----------
This thread might be useful to add more information (as they say "Here's one I made earlier")
Also, when booted in single user mode from a DVD, you have two mount points available on the DVD; /a and /mnt
I normally mount the device with the .dmp file (maybe a NFS mount from a remote machine containing the dump) on /mnt
I normally mount the newly created filesystem (slice) on /a
Thanks again for all the great info. As far as experience level, I had never worked with Solaris or Unix servers up until last week. What I know is what I've learned from Google and forums the past few days. I've dealt with ubuntu servers quite a bit, but thats a whole different ball game. Feel free to explain it to me like a toddler if you have the time. I could use the help!
I tried ufsresore with the t option and these are the results.
I went ahead and completed the steps you laid out. I mounted the HDD with the backup files at /mnt.
I setup the partitions, labels, and a new file system on the drive I am trying to restore to. I mounted it to /a like you suggested.
Below shows where I'm at.
Everytime I try to use the ufsrestore command I get an error that looks like it cannot find the tape drive /dev/rmt/0. I'm sure I must be putting in the file path wrong or something.
In the bash below I am trying to create sub-directories inside a directory from files with specific .bam extensions. There may be more then one $RDIR ing the directory and the .bam file(s) are trimmed (removing the extension and IonCode_0000_) and the result is the folder name that is saved in... (2 Replies)
Hi All,
I want to fetch the files based on .done file and display the .csv files and Wil take .csv files for processing.
1.I need to display the .done files from the directory.
2.next i need to search for the .Csv files based on .done file.then move .csv files for the one directory
... (2 Replies)
Hi
I Have a directory and i have some files below
abc.txt
abc.gif
gtee.txt
ghod.pid
umni.log
unmi.tar
How can use glob function to grep abc files , i have created a variable "text" and i assigned value as "abc", please suggest me how can we use glob.glob( ) to get the output as below... (2 Replies)
Hi, everybody!
I have a big problem. I don't understand Unix, but I work as a system administrator, and sometimes I make some data exports and I have to delete old .dmp files, but today I had a mistake, I wrote rm * 909*
This is a part of my folder contents in unix before deleting
drwxrwxr-x 2... (4 Replies)
Hi,
I know that to list files with no extension, we can use..
ls -1 | grep -v "\."
And to list .prog files, we can use..
ls -1 *.prog
or
ls -1 | grep '.prog$' (4 Replies)
I write lots of SAS programs and would like to create a script that allows me to have a template each time I create a new program file.
Specs:
I use EVIM for my editor. I run SAS in batch mode. We use RedHat 6.
I don't use c shell.
I want a script that will do the following:
>... (3 Replies)
Interpreter should be bash.
1. The problem statement, all variables and given/known data:
I need to make a file (myText.txt or song.mp3 or cloud.tar.gz or whatever) and then change the extension to (myText.TXT , song.MP3, cloud.TAR.GZ).
It would be good if I can add all information in... (4 Replies)
i want to export a database (full schema) so that I can import the database to a windows 2000 server. The database is sitting on a unix-sun solaris box ver 8.. What are the commands...
I am a bit rusty at unix at the moment!
Cheers
E (4 Replies)