Please HELP: rsync to create directory symbolic links

tim.conway at philips.com tim.conway at philips.com
Fri Sep 13 22:11:01 EST 2002


Here's what I'd do.
+++++++++++++++++++++++++++++++++++++++
(cd gridpt
find . -type l -print |cpio -oc )|
(cd $BACKUP/gridpt
cpio -vic)
+++++++++++++++++++++++++++++++++++++++

If you don't have cpio, gnu tar can do it.  Your syntax may vary...
+++++++++++++++++++++++++++++++++++++++
(cd gridpt
find . -type l -print |tar --files-from=- -cf -  )|
(cd $BACKUP/gridpt
tar -xvf -)
+++++++++++++++++++++++++++++++++++++++
If $BACKUP is something like "remotehost:" make it 
+++++++++++++++++++++++++++++++++++++++
(cd gridpt
find |archiver)|
rsh remotehost "cd /gridpt ;unarchiver"
+++++++++++++++++++++++++++++++++++++++
where archiver/unarchiver are the appropriate commandlines from the 
earlier examples.
symlinks don't take up much space, and aren't optimized by rsync anyway 
(except compressing the data stream, maybe).
You could also make a file containing the names of all your symlinks, and 
--include-from=that file, but I've never been able to understand that 
syntax well enough to always be certain about what's going to happen.

Tim Conway
tim.conway at philips.com
303.682.4917 office, 303.921.0301 cell
Philips Semiconductor - Longmont TC
1880 Industrial Circle, Suite D
Longmont, CO 80501
Available via SameTime Connect within Philips, caesupport2 on AIM
"There are some who call me.... Tim?"




Vincent Dao Vu <vd.vu at acm.org>
Sent by: rsync-admin at lists.samba.org
09/13/2002 01:44 PM

 
        To:     rsync at samba.org
        cc:     (bcc: Tim Conway/LMT/SC/PHILIPS)
        Subject:        Please HELP: rsync to create directory symbolic links
        Classification: 



Hi,

Currently I have to recreate the directory tree of my entire database 
and also rebuild all directory symbolic links. I just figure out how to 
recreate the directory tree without copying all the files over. I used:
rsync -av --include "*/" --exclude "*" gridpt/ $BACKUP/gridpt
This command creates the directory structure (tree) of the entire 
database udner gridpt (it doesn't copy files). But this command also 
ignores those subdirectories which are symbolic links to other 
directories. I cannot figure out how to rebuild all the directory (not 
file) links. Is there any option of rsync that I can use to carry out 
this purpose?

Thanks a lot for your time reading my email. I'm looking forward to your 
reply.

Vince


-- 
To unsubscribe or change options: 
http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html






More information about the rsync mailing list