From: nico osagie (nosagie@hotmail.com)
Date: Wed Feb 01 2006 - 17:46:44 EST
Hi All,
Sorry for not including the summary of the reply i got. Anyway here the most
common ones.
I used " tar cf site.tar /www/data " then extract using "tar .xvf
site.tar"
A) use tar.
cd sourcedir
tar cf - . | (cd /destdir && tar xvf -)
B) tar cf - . | (cd /dest-dir && tar xf -)
c) man cp
rtfm
Check out GNU fileutils package which includes 'cp',
with a lot more options.
Dave Foster
D) If copying from dir-a to dir-b, then:
cd /dir-a
tar cf - . | (cd /dir-b; tar xfp - )
Regards,
-- Reggie Beavers E) if /www/data1 is a partition itself, then the best possible way to copy it, and only it, and maintain symlinks, is to use a ufsdump piped to ufsrestore, e.g.: # cd /www/data2 # ufsdump 0f - /dev/rdsk/c0t0d0s5 | ufsrestore rf - `cp -pr` works only if you have no symlinks and aren't woried about sub partitions. F) cd /www/data find . -depth -print | cpio -pmdf /www/newdata G) rsync -lra /source/ /target/ kind regards Nick _______________________________________________ sunmanagers mailing list sunmanagers@sunmanagers.org http://www.sunmanagers.org/mailman/listinfo/sunmanagers
This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:38:49 EDT