Date: Thu, 22 Jan 2015 18:46:04 +0100 From: Polytropon <freebsd@edvax.de> To: Chris Maness <chris@chrismaness.com> Cc: "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>, markham breitbach <markhamb@corp.ssimicro.com> Subject: Re: Dump/Restore for system migration Message-ID: <20150122184604.4e089604.freebsd@edvax.de> In-Reply-To: <CANnsUMEBg4svfTOySaPEOweExQ9h-j6dWgyCiTiaBiuFO-X8uQ@mail.gmail.com> References: <CANnsUMESEWsEXyyKwqyrnTMiEEYuExTgD0Z4NBuJF0cYSWDChQ@mail.gmail.com> <20150120010551.c17d9f50.freebsd@edvax.de> <54C120E6.5090301@corp.ssimicro.com> <CANnsUMEBg4svfTOySaPEOweExQ9h-j6dWgyCiTiaBiuFO-X8uQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150122184604.4e089604.freebsd>