[TriLUG] symbolic links and rsync
James Tuttle
jjtuttle at trilug.org
Sat Mar 15 13:17:59 EDT 2008
Hi Paul,
I should have included the script. I'll look into l. Thanks!
#!/bin/bash
#
# Bilateral synchronization between laptop and desktop using rsync over
ssh.
#
#
###################
# Desktop to laptop
# sync remote documents to localhost
rsync -auzvv --copy-links --human-readable --update --partial -e "ssh
-l jjtuttle" jjtuttle at zulu:/home/jjtuttle/Documents/work/
/home/jjtuttle/Documents/work
# sync desktop documents to laptop deleting files on laptop that were
deleted on desktop. Danger!
#rsync -auzvv --copy-links --human-readable --update --partial
--delete-during -e "ssh -l jjtuttle"
jjtuttle at zulu:/home/jjtuttle/Documents/work/ /home/jjtuttle/Documents/work &
###################
# Laptop to desktop
# sync local documents to remote host
rsync -auzvv --copy-links --human-readable --update --partial -e "ssh -l
jjtuttle" /home/jjtuttle/Documents/work/
jjtuttle at zulu:/home/jjtuttle/Documents/work
# sync laptop documents to desktop deleting files on desktop that were
deleted on laptop. Danger!
#rsync -auzvv --copy-links --human-readable --partial
--update--delete-during -e "ssh -l jjtuttle"
/home/jjtuttle/Documents/work/ jjtuttle at zulu:/home/jjtuttle/Documents/work &
##################
# alert user
zenity --info --text "Laptop sync completed."
Paul McLanahan wrote:
> Are you using -l in your rsync script (it's implied in -a)? That
> should preserve links as links.
>
> On Sat, Mar 15, 2008 at 9:44 AM, James Tuttle <jjtuttle at trilug.org> wrote:
>> However, in addition to my desktop, I have a Solaris zone on which I
>> keep a bunch of scripts. So, in the home directory of my desktop I
>> created a mount point and mount the scripts directory on my zone via
>> Samba. That works fine until I run the rsync process from my laptop.
>> It seems that the symbolic link gets overwritten with a static directory
>> and any changes to scripts in that directory no longer propagate to the
>> zone.
--
--
---Jim Tuttle
------------------------------------------------------
http://www.braggtown.com
PGP Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x69B69B08
More information about the TriLUG
mailing list