Download User Manual - Computer Magic

Transcript
rsync
Chapter 31
What is rsync?
It stands for remote synchronization. rsync is a utility that provides a very fast method for
remote files to be kept in synchronization with the files on the Nitix server. It does this by
sending just the differences in the files to the remote site, without requiring both sets of files
to be present beforehand. rsync can only be utilized with a unix type remote system.
Using rsync
The rsync server must be enabled using WebConfig. The option is located in the LOCAL
configuration page.
From the remote unix system you need to mount your home directory as follows: “mount -t
nfs server:/export/home/username /tmp/username”
This will mount the "username” home directory from the Nitix "server" to the destination
directory of /tmp/username This has to be done as the root user on the remote unix system.To
access the directory that was just mounted the userid (uid) has to match for the user that is
accessing the directory or they will get a permission denied error. You can get the UID from
Nitix’s password (/etc/passwd) file and these should match to the uid on the local unix system. To get around the uid problem you can enable the Mapping scheme for NFS: to be
ugidd on Nitix system and then install ugidd daemon on the remote unix system. You can
then access the files as long as the user id is the same.
Once the directory has been mounted, you can synchronize the directory by issuing the following command on the remote unix station: “rsync -zav username@server::username/. /
tmpdir/.”
This will use the rsync protocol to sync "usernames" home directory from a Nitix system
called 'server' to /tmpdir/ on the local machine using the userid 'username'.
Nitix User Manual – Version 4.1
275