From owner-freebsd-virtualization@freebsd.org Tue Jan 23 13:00:31 2018 Return-Path: Delivered-To: freebsd-virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 626B7ED2B34 for ; Tue, 23 Jan 2018 13:00:31 +0000 (UTC) (envelope-from freebsd@grem.de) Received: from mail.grem.de (outcast.grem.de [213.239.217.27]) by mx1.freebsd.org (Postfix) with SMTP id D102F7A628 for ; Tue, 23 Jan 2018 13:00:30 +0000 (UTC) (envelope-from freebsd@grem.de) Received: (qmail 98025 invoked by uid 89); 23 Jan 2018 13:00:23 -0000 Received: from unknown (HELO ?192.168.250.192?) (mg@grem.de@93.104.68.20) by mail.grem.de with ESMTPA; 23 Jan 2018 13:00:23 -0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: syncing bhyve instances From: Michael Gmelin X-Mailer: iPhone Mail (14G60) In-Reply-To: Date: Tue, 23 Jan 2018 14:00:22 +0100 Cc: freebsd-virtualization@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <8BCCEBAF-EDA9-421B-815A-FB4E1BA5B57B@grem.de> References: <5A66137D.5090608@redbarn.org> To: tech-lists X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jan 2018 13:00:31 -0000 > On 22. Jan 2018, at 20:47, tech-lists wrote: >=20 >> On 22/01/2018 16:38, Paul Vixie wrote: >> for live sync you'll have to run software inside the guest that knows >> how to properly freeze state. for example if there's a live database of >> any kind you'll want it to be in its quiet state before you sync from >> it. in those situations, i do use rsync. >=20 > Yeah, thought it might be this. Sorry I wasn't more clear initially > about the use case. >=20 > Basically, the production server is in a datacentre and the reserve > server is on a very fast vdsl service. The reason for the reserve server > is, if the production server fails then I swap DNS to point at the > reserved server and the guests on it without interruption of service. > All guests are running databases (mysql) though they aren't especially > busy. So I guess the best bet would be mysql replication for the > databases and rsync for everything except mysql? >=20 > thanks everyone who took the time to answer For the database, mysql replication is the way to go (otherwise you would ne= ed to stop/lock the server every time you do a snapshot and you'll get near-= realtime replication which will always be more current than your snapshots).= For the system I'd suggest to create automation for the setup, so you can a= pply changes to both systems without a need to sync/clone/copy from one to t= he other. For anything else left (data files on disk, non-system, non-packag= e, non-config) use regular rsync (or zfs send if your setup permits - I'd st= ick with rsync). Yours, Michael p.s. Make sure to include monitoring (especially replication latency and dat= a integrity) >=20 > --=20 > J. > _______________________________________________ > freebsd-virtualization@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization > To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe@freeb= sd.org"