Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Backup tool to restore FS data

Status
Not open for further replies.

ranjit

Technical User
Apr 14, 2000
131
0
0
GB
I've been required to create a copy of a LV its associated FS and data content.

COPY LV PROCEDURE:
# cplv -v datavg -y lvnew lvold

I've created the relevant FS on the new LV (lvnew) and mounted it - such that there are now 2 mounted FS's.

What would be the best backup tool to copy the contents of the oldfs to the newfs, such that it:

1)perserves original file permissions
2)Preserves any symbolic links
3)carries out a recursive directory backup

Is the best tool tar???
Backup:
# cd oldfs
# tar -cvpf /tmp/bkup.tar .

Restore:
# cd /newfs
# cp /tmp/bkup.tar .
# tar -xvf bkup.tar

Would the above fulfill my needs or is there a better way?


 
This should do the trick as long as there are no files >2GB in size. I would be inclined to use tar -cvpdf and tar -xvpdf .

There are other ways. Personally I would use cp -Rph from /oldfs to /newfs which would save having to create a tar file

Dave
 
If you are doing a cplv, why are you then going to tar and untar the data again?
 
I find I trust cpio more for stuff like this.
Go to the source directory and do this:
find . -print |cpio -pdumv /targetdir

You can eliminate the "v" flag if you don't want to see it in action. This does the full recursive copy and maintains all permissions, etc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top