설치 및 업그레이드 > Advanced Deployment Considerations > Network Configuration > rsync Instructions
  
rsync Instructions
The rsync tool is an open source tool that allows fast incremental file transfers. The following web site provides more information on the rsync tool:
http://rsync.samba.org/
rsync is available on most UNIX distributions by default. It can also be found on various internet archives of precompiled software for all the UNIX operating systems supported by PTC. If rsync is not available, a system can be duplicated through other methods.
The following are optional rules on what to maintain when copying a Windchill system that applies to most tools:
The HTTP Server and Embedded Servlet Engine software used with the Windchill application can be relocated by copying or syncing the entire directory structure containing each application to the destination machine. On Windows, any start menu entries are not created automatically but can be created manually. Any Microsoft Windows Services created for HTTP Server, Embedded Servlet Engine, or Windchill needs to be reconstructed manually. On UNIX, rc scripts for starting and stopping the various Windchill components can be located in directories outside of the installation directories. For example, they can be located in various /etc directories. These files must also be manually copied over and maintained.
You should maintain the timestamps on the various Windchill files. Most backup tools and archive tools such as zip, tar, and rar have the ability to preserve file timestamps. For more information on the tool used to copy the system, see the rsync documentation in the following web site:
http://rsync.samba.org/documentation.html
rsync uses its own protocol for communicating between an rsync client and an rsync server. There are two primary methods of connecting an rsync client to an rsync server:
The first method is referenced as “USING RSYNC-DAEMON FEATURES VIA A REMOTE-SHELL CONNECTION” in the rsync manpage that can be found in the following web site:
http://rsync.samba.org/ftp/rsync/rsync.html
The second method is referenced as “STARTING AN RSYNC DAEMON TO ACCEPT CONNECTIONS”.
Connecting to an rsync Daemon Using a Remote-shell Connection
* 
Remote shell access is not normally enabled on Windows systems; therefore, this method is generally only used for UNIX and Linux systems.
An rsync client can remotely start an rsync server through a remote shell connection. For most one-time uses, this is the easiest method for the following reasons:
It does not require the configuration of an rsync server configuration file.
It does not require manually starting a server on the source system because the rsync client automatically starts the server.
Starting the rsync server remotely does require that the server have a remote shell available. Remote shells that support rsync are rsh and ssh. To use this method, verify with a UNIX system administrator whether a remote shell such as rsh or ssh are available.
Use the following command format to run on the target system for synchronizing a source system to a target system:
rsync -av -e [ssh or rsh] [user]@[sourcesystemhostname]:[absolute path to
application]/][target path to application]
For example, assume that you are using ssh on the target system known as windchillserver and the user that owns the files is wcadmin. Then enter the following command:
rsync -av -e ssh wcadmin@windchillserver:/source/windchill/ /destination/windchill
This command connects through ssh as the user wcadmin on the Windchill server and starts up an rsync server. The client synchronizes /location/to/windchill to the local directory /location/to/windchill on the target system. If using rsh, replace -e ssh with -e rsh.
The recommended options -av enable archive mode and turn on some verbosity. Archive mode recursively copies all directories in files in /location/to/windchill, preserves symbolic links, timestamps, file permissions, file ownership, and any special UNIX file types.
If /location/to/windchill exists, and contains files that do not currently exist on the source system, the -delete argument can be added to delete those files. Using the -delete argument results in the target directory contents being identical to the source contents.
Manually Connecting to an rsync Daemon to Accept Connections
In cases where the remote shell functionality is not available or where you need to rsync multiple machines from a single source system, the rsync daemon (rsyncd) can be a more effective solution. This is the case on Windows, which does not normally enable a remote shell access.
The following is an example of the rsyncd.conf file on the server:
use chroot = no
[windchill]
path=/location/to/windchill
comment= Windchill application
This rsyncd.conf file defines a [Windchill] module with a location of /location/to/windchill.
The use chroot = no directive is only required when running the rsync daemon as a non-root user.
The rsync daemon can be started with the following command:
rsync --daemon --config=[path to rsyncd.conf file]
By default, the rsync port is 873. Binding to this port requires root privileges. Include the following for non-root binding:
--port=[some port higher than 1024]
For more information on rsync daemon configuration, see the rsyncd.conf manpage in the following web site:
http://rsync.samba.org/ftp/rsync/rsyncd.conf.html
After the rsync daemon is started, the rsync client can be used to connect directly to it to perform a synchronization. Use the following command format for the synchronization:
rsync -av rsync://[source system]:[rsync daemon port]/[rsync module] /location/to/windchill
For example, assume that an rsync daemon is configured using the example rsyncd.conf file running on windchillserver. Then enter the following command:
rsync -av rsync://windchillserver:873/windchill /location/to/windchill
The port portion (:873) can be omitted if the rsync daemon is running on the default port.
Additional rsync command options and rsync daemon configuration file parameters are documented in the rsync documentation. You can find the rsync documentation in the following web site:
http://samba.anu.edu.au/rsync/documentation.html
If advanced rsync configuration is required, then see the rsync documentation.