Man page is at: http://samba.anu.edu.au/ftp/rsync/rsync.html
On both machines
- Make sure the filesystems are set up identically, if you'll be overwriting /etc/vfstab
- get the rsync binary from an existing machine or the precompiled one at ftp://ftp.samba.org/pub/rsync/binaries/Solaris/
- on the source machine install in //usr/local/bin/. On the destination machine, put it somewhere it won't be overwritten- even //tmp/
On the target machine
- create an /etc/rsyncd.conf, sample below
- crank up a daemon in the foreground (you probably don't want to leave it running) rsync --daemon --no-detach
- The no-detach leaves it in the foreground so you won't accidentally leave it running.
- Control-C and remove //etc/rsyncd.conf when you're done.
On the source machine
Example: destination machine is named tomcat2, and you want to move over the //usr/local/ directory: rsync -v --archive \ /usr/local/ rsync://tomcat2/ROOT/usr/local/
Example: to sync the whole machine except for /etc (no point copying /proc either) rsync -v --archive \ --exclude '^/etc/' --exclude '^/proc/' \ / rsync://tomcat2/ROOT/
- afterwards, on the destination machine, run installboot to make sure the boot block is correct
The trailing slashes on the directory names are important. You may also want the option *--one-file-system* to copy one filesystem at a time.
Sample rsyncd.conf
[ROOT]
uid = root
path = /
hosts allow = 10.1.211.4
read only = false
Category: HowtoCategory SolarisCategory