1837765 Members
3620 Online
110119 Solutions
New Discussion

copy filesystem

 
SOLVED
Go to solution
Binu_5
Regular Advisor

copy filesystem

Hi All

I have requirement here to copy one entire filsystem to another one .. Can any body tell me which is the best method for copying the filesystem to another one

Thanks
Binu
4 REPLIES 4
Devender Khatana
Honored Contributor

Re: copy filesystem

Hi,

It is important to know what are two file systems types ? Where are these two file systems located wheather on same or different machines/platforms ? What are there sizes same or different ?

If file system sizes are same then you can use dd. If these are defferent then could thought of something like cpio. But for both to work the file systems should be on unix platform.

HTH,
Devender
Impossible itself mentions "I m possible"
Con O'Kelly
Honored Contributor
Solution

Re: copy filesystem

Hi Binu

You can use cpio as follows:

# cd
# find . -depth -print | cpio -pmdv

Example copy contents of /home to /backup:
# cd /home
# find . -depth -print | cpio -pmdv /backup

Cheers
Con
Sudeesh
Respected Contributor

Re: copy filesystem

1. You can use dd if both filesystems are of same size.
2. cpio

find /source -depth -print | cpio -pdlmv /destination


Sudeesh
The most predictable thing in life is its unpredictability
Binu_5
Regular Advisor

Re: copy filesystem

Hi All

I have done in this way and it worked fine

# cd
# find . -depth -print | cpio -pmdv

Example copy contents of /home to /backup:
# cd /home
# find . -depth -print | cpio -pmdv /backup

Thanks
Binu