[Csync2] Just caused myself a symlink headache?

Dan Brown danb at zu.com
Thu Jul 17 22:47:29 CEST 2008


I'm in the process of remotely setting up a new server to mirror a local
one.  Of course in copying the data over I used rsync on a directory
structure which followed the directory structure and recreated the data
rather than the symlink.  So now I've got:

/home/web/dirA
/home/web/dirB
/home/web/dirC
/home/web/file1
/home/web/file2

Rather than
/home/web -> /opt/weblibs/

The remote server has been just doing dry runs for the last couple of days
as I'm weeding out the last couple of items I may be missing.  This
afternoon I noticed the recreated directory structure and without thinking
first wiped it out and recreated the symlink instead.  Of course I forgot
about turning off the sync and csync2 marked the missing files all dirty to
attempt to delete them off of the local server.  Will csync2 NOT follow the
symlink, not delete all of those files and fix itself?  
Or should is my best bet to just play it safe and re-init the csync2
databases with the following:

(Lars from April 18, 2008)
> # wipe out old state
> on both# rm /var/lib/csync2/*
>
> # reinitialize
> on both# csync2 -cIr /
> 
> # compare state, and mark dirty,
> # using the side you want to use as sync source only on source# csync2
-TIUX /
> 
> # sanity check
> on source# csync2 -M
> on source# csync2 -udv
> 
> # actually sync it
> on source# csync2 -uv


___________________________________________________________
Dan Brown
danb at zu.com



More information about the Csync2 mailing list