[vox-tech] rsync as an installation / update tool
Aaron A. King
vox-tech@lists.lugod.org
Tue, 30 Mar 2004 15:18:21 -0500
=2D----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Yeah, rsync -essh is way cool. =20
The only problems I can think of would arise if you had different hardware =
or=20
different glibc on the different machines, so that executables wouldn't be.
Also, probably you want /var in the exclude list. Maybe I'm just the nervo=
us=20
type, but I'd be worried about just copying over /lib/modules in this way,=
=20
too.
By the way, I have found unison (http://www.cis.upenn.edu/~bcpierce/unison/=
)=20
to be an extremely useful and easy-to-use file synchronizer and a good=20
supplement to rsync. It supports ssh too. I use it for /home stuff, not=20
anything above that.
Aaron
> First, let me rave about rsync. It is easy to use, very fast, and can=20
> be used directly with ssh, another favorite tool of mine. I first=20
> started to use it to back up my laptop's home directory onto a desktop,=20
> like this:
>=20
> $rsync -vax -e ssh --exclude=3Dmnt/ --exclude=3Dsome_file --delete-exclud=
ed=20
> /home username@desktop:/path_to_backup_folder
>=20
> I put this one line in a script for ease of use. If many exclusions are=
=20
> desired, a list can be put in a text file to be read by rsync.
>=20
> This week I got a wild idea to use rsync as a means of "installing" and=20
> "updating" gentoo linux on computers with similar (but not identical)=20
> hardware. I have 4 Pentium3 boxes that I use for engineering=20
> simulations. I had installed gentoo linux on one computer a couple=20
> months ago, but the others had RedHat 9. I love gentoo, but I didn't=20
> want to spend hours converting them all if I could avoid it. So my idea=
=20
> was to wipe redhat, re-partition the drive (if necessary), install the=20
> _basic_ stage3 gentoo install using the "livecd", and rsync over=20
> everything else from the computer with gentoo already installed. Here=20
> is the rsync command I used:
>=20
> #rsync -va -e ssh --exclude-from=3Dexclude_file --delete-after=20
> root@gentoo_computer:/ /
>=20
> exclude_file
> ------------
> dev/
> home/
> mnt/
> proc/
> root/
> sys/
> etc/fstab
> etc/X11/XF86Config
> etc/hostname
> etc/hosts
> etc/conf.d/net
> boot/grub/grub.conf
>=20
> Since I have different video cards and different partition schemes, I=20
> have to configure XF86Config, fstab, and grub.conf manually. But almost=
=20
> everything else copies over and works automatically, such as firewall,=20
> ntp, and logrotate settings. Now I just need to download and compile=20
> updates for one computer, and then use the same rsync command to update=20
> the other 3.
>=20
> So far, I have been successful with one computer and am waiting to see=20
> if any bugs appear before doing the other 2. Any comments? Are there=20
> any potential pitfalls to maintaining computers this way?
>=20
=2D --=20
Aaron A. King
Ecology & Evolutionary Biology
University of Tennessee
http://www.tiem.utk.edu/~king
GPG Public Key: 6ABA0716
=2D----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFAadYT9P08W2q6BxYRAlkzAJ9EgvwLS1VoQSHmcZoYtiI4C61CtwCfdikX
e0bQqfBttJdEwyxfXWJJZyE=3D
=3DPJom
=2D----END PGP SIGNATURE-----