Can ufsdump create files that have a .vtoc and .dmp extension?


 
Thread Tools Search this Thread
Operating Systems Solaris Can ufsdump create files that have a .vtoc and .dmp extension?
# 1  
Old 08-19-2016
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.
Code:
SPACE.TAR        partition0.vtoc  partition3.vtoc
partition0.dmp   partition3.dmp

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
# 2  
Old 08-19-2016
Note:
ufsdump -
man pages section 4: File Formats



There is magic in the headers, i.e. the file command will tell you if a file is in usable ufsdump format, regardless of any file extension.

Try that to identify your files. Ignore file extensions for now.
This User Gave Thanks to jim mcnamara For This Post:
# 3  
Old 08-21-2016
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'.
This User Gave Thanks to hicksd8 For This Post:
# 4  
Old 08-23-2016
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.
This User Gave Thanks to hicksd8 For This Post:
# 5  
Old 08-23-2016
Thank you! (update)

Jim and Hickd8,

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.
Code:
 # file partition0.dmp
partition0.dmp: ufsdump archive file

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.
Code:
# ls -l
total 13969424
-rwxr-xr-x   1 root     root     2795765760 Jan 29 17:34 *
-rwxr-xr-x   1 root     other    3095059086 Jan 28 02:18 partition0.dmp
-rwxr-xr-x   1 root     other    12546538 Jan 28 02:18 partition0.vtoc
-rwxr-xr-x   1 root     other    1343487 Jan 28 02:18 partition3.dmp
-rwxr-xr-x   1 root     other    1341439 Jan 28 02:18 partition3.vtoc
-rwxr-xr-x   1 root     other    1242731825 Jan 28 02:19 space.tar

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.
Code:
a8▒none//dev/dsk/c1t0d0s0ncciris▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒?▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒?▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒?▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒_▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒~▒▒▒▒▒▒▒▒▒▒

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:
Mod Comment 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.
Code:
boot cdrom -s

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.
Code:
mkdir /tmp/slice0

Step 3. Mount the drive to that directory.
Code:
]mount /dev/dsk/c1t1d0s0 /tmp/slice0

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.
Code:
mkdir /tmp/backup
mount /dev/dsk/c1t0d0s0 /tmp/backup

Both devices mounted successfully.
Code:
/tmp/slice0 on /dev/dsk/c1t1d0s0 read/write/setuid/intr/largefiles/onerror=panic/dev=800008 on Tue Jan 30 11:43:54 1996
/tmp/backup on /dev/dsk/c1t0d0s0 read/write/setuid/intr/largefiles/onerror=panic/dev=800000 on Tue Jan 30 11:48:06 1996

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.
Code:
# ufsdump 0f - /tmp/backup/partition0.dmp | (cd /tmp/slice0;ufsrestore xvf -)

Output:
Code:
# ufsdump 0f - /tmp/backup/partition0.dmp | (cd /tmp/slice0;ufsrestore xvf -)
DUMP: Writing 32 Kilobyte records
DUMP: Date of this level 0 dump: Tue Jan 30 11:53:04 1996
DUMP: Date of last level 0 dump: the epoch
DUMP: Dumping /dev/rdsk/c1t0d0s0 (:/tmp/backup) to standard output.
Verify volume and initialize maps
DUMP: Mapping (Pass I) [regular files]
DUMP: Mapping (Pass II) [directories]
DUMP: Estimated 6060298 blocks (2959.13MB).
DUMP: Dumping (Pass III) [directories]
Dump date: Tue Jan 30 11:53:04 1996
Dumped from: the epoch
DUMP: Dumping (Pass IV) [regular files]
Extract directories from tape
Initialize symbol table.
Extract requested files
extract file ./partition0.dmp

DUMP: 46.50% done, finished in 0:11
DUMP: 92.99% done, finished in 0:01
DUMP: 6060286 blocks (2959.12MB) on 1 volume at 2347 KB/sec
DUMP: DUMP IS DONE
Add links
Set directory mode, owner, and times.
set owner/mode for '.'? [yn] set owner/mode for '.'? [yn] y

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.
Code:
cd /tmp/slice0
# ls -l
total 6048034
drwx------ 2 root root 8192 Jan 29 07:49 lost+found
-rwxr-xr-x 1 root root 3095059086 Jan 29 18:05 partition0.dmp
drwxr-xr-x 3 root sys 512 Jan 28 02:15 usr

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.

Code:
# cd /tmp/slice0
# ls
lost+found      partition0.dmp  usr
# ufsrestore rf partition0.dmp
resync restore, skipped 265154 blocks
Cannot find file dump list


Last edited by RudiC; 08-23-2016 at 03:42 PM.. Reason: Added CODE tags.
# 6  
Old 08-24-2016
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:

Code:
# format -e

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:

Code:
# newfs <node name> (eg, /dev/dsk/c0t0d0s0)

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")

Restoring a system from a backup

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

Change directory to /a and ufsrestore the dump.

Hope that helps.
# 7  
Old 08-24-2016
/dev/rmt/0: No such file or directory

Hi Hicksd8,

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.
Code:
# cd /tmp/backup
# ls
bin             etc             lost+found      platform        usbdrive
cdrom           export          mnt             proc            usr
data            home            net             sbin            var
dev             kernel          opt             space           vol
devices         lib             partition0.dmp  tmp             xfn
# ufsrestore -t partition0.dmp
/dev/rmt/0: No such file or directory
# ufsrestore -t /tmp/backup/partition0.dmp
/dev/rmt/0: No such file or directory
# ufsrestore t /tmp/backup/partition0.dmp
/dev/rmt/0: No such file or directory
# ufsrestore t partition.dmp
/dev/rmt/0: No such file or directory
#

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.

Code:
/mnt on /dev/dsk/c1t0d0s0 read/write/setuid/intr/largefiles/onerror=panic/dev=800000 on Mon Jan  1 11:23:13 1996
/a on /dev/dsk/c1t1d0s0 read/write/setuid/intr/largefiles/onerror=panic/dev=800008 on Mon Jan  1 11:24:36 1996
# cd /mnt/
# ls
bin             etc             lost+found      platform        usbdrive
cdrom           export          mnt             proc            usr
data            home            net             sbin            var
dev             kernel          opt             space           vol
devices         lib             partition0.dmp  tmp             xfn
# pwd
/mnt
# cd
# cd /a/
# ls
lost+found
# ufsrestore x /mnt/partition0.dmp
/dev/rmt/0: No such file or directory

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.

Thanks again for all the great info!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash to create sub directories from specific file extension

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)
Discussion started by: cmccabe
2 Replies

2. UNIX for Dummies Questions & Answers

Display the .csv extension files based on .done extension fine

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)
Discussion started by: girija.g6
2 Replies

3. Shell Programming and Scripting

Python - glob () - How to grep same files with different extension files

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)
Discussion started by: kumar85shiv
2 Replies

4. UNIX Desktop Questions & Answers

Problem with deleting .dmp file

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)
Discussion started by: susan12
4 Replies

5. UNIX for Dummies Questions & Answers

How to list files with no extension together with *.prog files?

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)
Discussion started by: adshocker
4 Replies

6. Shell Programming and Scripting

Script to create EVIM template with SAS extension

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)
Discussion started by: starbecks
3 Replies

7. Solaris

Configure Veritas DMP

I am looking forward to configure Veritas DMP on Solaris-10. All pointers appreciated. Thanks, (3 Replies)
Discussion started by: menonk
3 Replies

8. Homework & Coursework Questions

Create file and then change the extension case.

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)
Discussion started by: Kdenmen
4 Replies

9. Linux

Dmp

hi, anyone know how to enable dynamic mutipathing under redhat AS in a SAN-enviroment? thx a lot (1 Reply)
Discussion started by: pressy
1 Replies

10. Solaris

exporting a dmp file (oracle)from unix

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)
Discussion started by: etravels
4 Replies
Login or Register to Ask a Question