Operating System - Linux
1828208 Members
2360 Online
109975 Solutions
New Discussion

Re: copy filesystems with dump command.

 
SOLVED
Go to solution
Eduardo Nakasone
Occasional Contributor

copy filesystems with dump command.

I want to copy one filesystem to other filesystem with dump command on linux red hat 7.1. But I don?t know how.
I think that the command to do this is something like:
restore | dump

Thank you.
2 REPLIES 2
Gerald Corson
New Member

Re: copy filesystems with dump command.

you can use dump to make a system backup and then use the restore command to restore that backup onto the other drive

I am not entirely sure that you can pipe the output of dump directly to restore. You might be able to however I recommend dumping to tape and restoring back from it
Bernie Vande Griend
Respected Contributor
Solution

Re: copy filesystems with dump command.

You can do this. The only obstacle is the that it will include the full path in the restore. Here's an example assuming copying of /home to /home2

dump -0 -f - /home | (cd /home2; restore -x -f -)
This works well, except that the home directory will appear under /home2 and then you just need to use move to rename it to where it should be.
Ye who thinks he has a lot to say, probably shouldn't.