Dump and Restore


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Dump and Restore
# 1  
Old 07-07-2009
Dump and Restore

I want to copy over the contents of one partition on hard drive A to another partition on hard drive B. Using DD command caused problems since it overwrote the partition information on hard drive B and made hard drive B's partition size the same as the one on partition A.

Our department manager thinks that using dump piped to restore should do the trick.
I am trying to work out the syntax:

dump /dev/sda1| restore /dev/sdb1

Wil dump/restore work in the way we want it to?
# 2  
Old 07-07-2009
If we agree what you call partition is what we unix guys call filesystem, then copying the content of one filesytem to another is quite an easy task two options: using tar, or using cpio:
I prefer for this cpio
go to mount point of the first filesystem,
then:
Code:
find . -xdev| cpio -pdumlvx /<destination mountpoint>
or
find . -print | cpio -pduml /dest-directory

# 3  
Old 07-07-2009
Please state your Operating System and version. This is going to be O/S specific.
Do you want to copy a Bootable System Partition or a Data Partition?
Can both partitions be mounted (i.e. they are not raw filesystems)?
What is the filesystem type (e.g. VXFS, UFS)?


The general solution for mounted Data Partitions is to use "cpio -p". The switches for cpio vary from O/S to O/S. Some need a large block size (say 64kb) for speed - some don't. The switch for not traversing filesystem boundaries varies too (some are "-mount", some are "-xdev").

Code:
For example.
Where /source_mountpoint is a quiescent mounted filesystem.
Where /destination_mountpoint is an empty filesystem.

cd /source_mountpoint
find . -xdev -print | cpio -pdumv /destination_mountpoint


Last edited by methyl; 07-07-2009 at 01:25 PM.. Reason: Typo
# 4  
Old 07-07-2009
I just tested for you the use of tar for this purpose (it works (on hpux...))
Code:
tar -cvf - testdir |$(cd /ant/vbe/tartest; tar -xvf -)

To answer your initial question, dump/restore is used for filesystems as a whole, it may not be your intention, the idea is to have a filesystem backup not a directory content copy...Your question answered?

Last edited by vbe; 07-07-2009 at 01:42 PM.. Reason: spelling -typo...
# 5  
Old 07-07-2009
Quote:
Originally Posted by methyl
Please state your Operating System and version. This is going to be O/S specific.
Do you want to copy a Bootable System Partition or a Data Partition?
Can both partitions be mounted (i.e. they are not raw filesystems)?
What is the filesystem type (e.g. VXFS, UFS)?


The general solution for mounted Data Partitions is to use "cpio -p". The switches for cpio vary from O/S to O/S. Some need a large block size (say 64kb) for speed - some don't. The switch for not traversing filesystem boundaries varies too (some are "-mount", some are "-xdev").

Code:
For example.
Where /source_mountpoint is a quiescent mounted filesystem.
Where /destination_mountpoint is an empty filesystem.

cd /source_mountpoint
find . -xdev -print | cpio -pdumv /destination_mountpoint


I would be using Knopix 5.x

---------- Post updated at 12:35 PM ---------- Previous update was at 12:33 PM ----------

Quote:
Originally Posted by vbe
I just tested for you the use of tar for this purpose (it works (on hpux...))
Code:
tar -cvf - testdir |$(cd /ant/vbe/tartest; tar -xvf -)

To answer your initial question, dump/restore is used for filesystems as a whole, so it may not be your intention, the idea is to have a filesystem backup not a directory content copy...
So if we use dump/restore would be have the problem we originally encountered when the dd command made the new hard drive 143 GB partition into a 63GB partition?
# 6  
Old 07-07-2009
Quote:
So if we use dump/restore would be have the problem we originally encountered when the dd command made the new hard drive 143 GB partition into a 63GB partition?
I don't have Knopix. My recollection of dump/restore is that they work on mounted filesystems not raw partitions. Yours may be different.

Code:
There is an example of chaining dump and restore in my O/S "man restore" . Not tested and may not apply to your O/S.

It states:

Thus, dump and restore can be used in a pipeline to dump and restore a file system with the command

dump 0f - /usr | (cd /mnt; restore xf -)


Last edited by methyl; 07-07-2009 at 02:07 PM.. Reason: Displaced tag
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

restore dump from veritas format using ufs file system

hi all i have a DLT tape in that tape backup is there is in veritas volume format and i want to restore it in ufs file system how can i do it? right now i don't have veritas file system setup. i have only ufs file sysytem please help some production data is to be restore. (3 Replies)
Discussion started by: nikhil kasar
3 Replies

2. UNIX for Dummies Questions & Answers

dump/restore of a fs with 100 of millions hardlinks

Hi :-) i have a dump of a backupdisk (~540GB / ext3). The Backups have some 100 millions of hardlinks (backups are created with storeBackup). The OS is linux. A restore of a directory ended after some days with the errormessage "no memory to extend symbol table" The restore of the complete... (0 Replies)
Discussion started by: turricum
0 Replies

3. AIX

mksysb restore - Wrong OS level for restore

Hi all, I am still working on my mksysb restore. My latest issue is during an alt_disk_install from tape I got the following error after all the data had been restored. 0505-143 alt_disk_install: Unable to match mksysb level 5.2.0 with any available boot images. Please correct this... (0 Replies)
Discussion started by: pobman
0 Replies

4. UNIX for Dummies Questions & Answers

How to restore a dump file on the disk

Hi all, i am a real dummy to unix and in need of help.My platform is Sun solaris(5.9) I have a dump file, an oracle cold backup taken with ufsdump command. This dump file resides on the disk, not the tape. I want to extract this dump file to a directory. But i cant, i read about ufsrestore... (1 Reply)
Discussion started by: merope
1 Replies

5. UNIX for Dummies Questions & Answers

Dump and restore problem

Hi all, having problem with dump & restore for cloning simple linux system. The command is : dump -0u -f /temp/var.dump /dev/sda5 But somehow the result displayed: ~~~~~~ dump: ACLs in inode #1250760 won't be dumped: Inappropriate ioctl for device dump: ACLs in inode #1250761 won't be... (1 Reply)
Discussion started by: mycoolwater
1 Replies

6. Red Hat

Dump and restore command usage ??

Hi, I am using RHEL 4.0 I need to take backup of a directory and then restore it to some other location. For taking Backup of final directory, I am using this code: dump -0aj -f /home/vicky/final.dump /home/vicky/final/ Now, I am trying to restore this final.dump to some other... (2 Replies)
Discussion started by: vikas027
2 Replies

7. Shell Programming and Scripting

restore mysql dump file in many remote servers?

Hi all, I want to restore DB file in many mysql servers, i already using script for sending the dumpfile in all servers, but it's just annoying if i have to restore the dumpfile in all servers, i want just execute 1 script, and will restore in all remote mysql servers. I make script but not... (2 Replies)
Discussion started by: blesets
2 Replies

8. UNIX for Dummies Questions & Answers

restore dump - help

I have a file with .dmp.gz. I am trying to uncompress this file in a new directory. was able to use gzip to take off the gz extension. How do I get the .dmp extension off? Will ufsrestore work on SUN system? HELP! (2 Replies)
Discussion started by: sankera
2 Replies

9. UNIX for Dummies Questions & Answers

help, what is the difference between core dump and panic dump?

help, what is the difference between core dump and panic dump? (1 Reply)
Discussion started by: aileen
1 Replies
Login or Register to Ask a Question