From owner-freebsd-questions@FreeBSD.ORG Thu Jan 22 17:46:12 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1C511C99 for ; Thu, 22 Jan 2015 17:46:12 +0000 (UTC) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFF42AEC for ; Thu, 22 Jan 2015 17:46:11 +0000 (UTC) Received: from r56.edvax.de (port-92-195-61-84.dynamic.qsc.de [92.195.61.84]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx02.qsc.de (Postfix) with ESMTPS id 2EC022767C; Thu, 22 Jan 2015 18:46:05 +0100 (CET) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id t0MHk4WK002382; Thu, 22 Jan 2015 18:46:05 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Thu, 22 Jan 2015 18:46:04 +0100 From: Polytropon To: Chris Maness Subject: Re: Dump/Restore for system migration Message-Id: <20150122184604.4e089604.freebsd@edvax.de> In-Reply-To: References: <20150120010551.c17d9f50.freebsd@edvax.de> <54C120E6.5090301@corp.ssimicro.com> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "freebsd-questions@freebsd.org" , markham breitbach X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 17:46:12 -0000 On Thu, 22 Jan 2015 09:38:12 -0800, Chris Maness wrote: > > On 2015-01-19 5:05 PM, Polytropon wrote: > > >> Is there a better way to do this? > > > Usually not, because dump + restore is _the_ way to do it. > > > Except of course you're using ZFS. :-) > > I have often done system migrations using rsync over ssh something like > > > > rsync -aHv / root@targethost:/ > > > > The great thing about rsync is that is will only transfer what it needs > > to, so the first run will take a while to get pretty much everything > > over. I then run a second time with a --delete switch to catch anything > > that changed while the first run was going (A full sync of my mail store > > can take well over 24 hours!). The second run will go much faster, > > depending on the size of the initial run. Finally, I will mount RO, so > > I know nothing is changing and run a final sync, which usually only > > takes a couple of minutes, then light up the new system. > > > > If you already have a system dump/restore you could also just use rsync > > as the final step to catch the stragglers. > > That actually sounds pretty good. The target system has been running for a > few days source system powered off. I am not sure if a rsync right now > would do more harm than good. However, I do understand that rsync will > ignore files that have already changed. > > I use rsync -vaur flags on most of my backups. Note that it's not just about file modification. The copying mechanism has to be able to deal with _all_ file attributes (standard file permissions, file flags, and also specials such as symlinks and hardlinks). With dump + restore, you definitely get an 1:1 copy, especially when you dump from the source system (immutable!) to a clean (empty) disk of the target system. For transfering additional changes, rsync is a good tool. I'd also like to mention the program "cpdup" from the ports collection. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...