[Csync2] Sync of dissimilar hosts and dry run output deciphering
Lars Ellenberg
lars.ellenberg at linbit.com
Fri Apr 18 13:00:09 CEST 2008
On Thu, Apr 17, 2008 at 09:57:56AM -0600, Dan Brown wrote:
> About four months ago I setup a server, copied quite a bit of data to it
> (around 60GB) and installed it in a remote collocation site about 600km away
> from our primary site. At that point no csync2 initialization had been done
> on the host and due to various circumstances (telco problems, remote support
> problems, etc) the server didn't get initialized with csync2 until recently.
>
> So in the meantime the primary server all of the data was originally copied
> off of has changed a bit and some of the files from the original copy are no
> longer there. If it weren't so much data (about 77GB now) I'd just wipe out
> all of the data on the (currently) slave and re-sync it. I've only setup
> replication like this locally before and never over a WAN link through the
> general internet.
>
> I did an initial sync from the primary server to the secondary server and it
> updated quite a few GB of files. I would like to update from the secondary
> server to the primary but it appears that it wants to re-add some files
> which have been deleted off of the primary server.
> I'm assuming that since my conflict resolution is "auto left;" it wont
> actually re-add the files to the primary server (Demeter), but will it leave
> them in a dirty state when I run csync2 -xv on the secondary server
> (Persephone) until I manually remove them (all 5000!) or will it delete them
> locally automatically once it realizes that the master/primary server
> doesn't have them?
>
> Once the secondary is sync'd with the primary I plan to turn the config into
> a master-master setup.
# 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
-----------------
# other possibility:
# wipe out old state
on both# rm /var/lib/csync2/*
on source# rsync -Pavz --delete sourcedir/ target:targetdir/
# reinitialize csync2
on both# csync2 -cIr /
# compare state, and mark dirty,
# using the side you want to use as sync source
only on source# csync2 -TIUX /
now, csync2 -M should report nothing.
--
: Lars Ellenberg Tel +43-1-8178292-55 :
: LINBIT Information Technologies GmbH Fax +43-1-8178292-82 :
: Vivenotgasse 48, A-1120 Vienna/Europe http://www.linbit.com :
More information about the Csync2
mailing list