Operating System - HP-UX
1754403 Members
3086 Online
108813 Solutions
New Discussion юеВ

backup of file system using dd

 
SOLVED
Go to solution
Pradeep_3
Frequent Advisor

backup of file system using dd

Can I use dd command for backing up file system? What should I use as input file, /dev/vgname/lvol, or /dev/vgname/rlvol of /filesytstemname? Is it advisable to use dd on a file system having files more than 1 lakh and sized 30 GB.

Thanks in advance
Paresh Kalathia
10 REPLIES 10
Steven E. Protter
Exalted Contributor

Re: backup of file system using dd

You can use dd if you want.

I don't think its advisable because its difficult to restore files. At least more difficult than a Data Protector or fbackup file restore.

My two cents

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Balakumar M
Frequent Advisor

Re: backup of file system using dd

You can use dd command to backup, if you want to copy complete filesystem to another file system use raw volume group, disadvantage use dd is you can not resotre single file and it copy the bad sector while copying the sources. better use fbackup to backup the data.

Best regards,
Bala
Life is a continues learning process
twang
Honored Contributor

Re: backup of file system using dd

In disk level, yes you can, but no recommended.
I will not use dd for routine backup, but use it for only ad hoc system maintenance purpose. For example, sometimes I will backup the disks on which oracle data exists before I need to apply patch on the database.

Copy from disk to backup disk,
# dd if=/dev/rdsk/source_disk of=/dev/rdsk/target_disk
Ravi_8
Honored Contributor

Re: backup of file system using dd

Hi paresh

you have use /filesystem name as the i/p.

my advise is to usr gnu tar rather than using dd for high volume backup, since it can support high volume backup and faster also
never give up
Pradeep_3
Frequent Advisor

Re: backup of file system using dd

Thanks for the solution

I ma trying to do storage migration.
both the storages are connected to same sever by fibre link.
I have one very big filesystem of 30 GB and there are more than 3,00,000 files.
I have omniback 4.0 which has limitation of listing 65000 files in gui and even for that it takes very long time.

What is the suggested way to transfer? dd, fbackup or any other suggested way to transfer this file system safely and fast.

Thanks in advance
Paresh Kalathia
Michael Schulte zur Sur
Honored Contributor
Solution

Re: backup of file system using dd

Hi,

with dd you would have to umount the file system to avoid access and likely inconsistencies. My idea:
fbackup ... | frecover ...
A direct copy between two dirs.
If you need, I can specify the syntax.

Michael
Pradeep_3
Frequent Advisor

Re: backup of file system using dd

Thanks Micheal

I would appriaciate if you will give me script for all three ways

After unmounting file system do i need to use /dev/vgname/lvol or /dev/vgname/rlvol in input file and output file? and what block size should I give if I use dd?

Paresh Kalathia
Michael Schulte zur Sur
Honored Contributor

Re: backup of file system using dd

Hi Paresh,

I suggest:
fbackup -i /dir1 -f - | (cd /dir2; frecover -Xrf -)

to do the copy. Forget about dd. There are to many uncertainties.

Michael
Karthik S S
Honored Contributor

Re: backup of file system using dd

You can backup using dd. But not at indivdual filesystem level. But disk to disk. No matter how many filesystems (Logical Volumes formatted with vxfs/hfs) that disk contains. Refer to this thread,

http://forums1.itrc.hp.com/service/forums/questionanswer.do?admit=716493758+1075365000692+28353475&threadId=381326

-Karthik S S
For a list of all the ways technology has failed to improve the quality of life, please press three. - Alice Kahn