Using the filesync(1) Command With NFS and automount(1M)
This section contains a procedure for using the filesync(1) command with NFS and the automount(1M) command. This can be part of a business disaster recovery and business continuance solution. The synchronized servers can be within a data center or between two servers that are miles apart.
To Use NFS and automount(1M)
Choose the directory you want to synchronize.
In this procedure, we use /mycaddata, which is on oldserver.
Ensure that the server is running the automount(1M) daemon.
If it is not running the automount(1M) daemon, add the following lines to the /etc/auto_master file:
# Master map for automounter # +auto_master /net -hosts -nosuid,nobrowse
After adding these lines, start the automount daemon with the following command:
# /etc/init.d/autofs start
See automountd(1M) for more information about the automount daemon.
Choose the server and directory to which you want to synchronize.
In this procedure, we use newserver and /mycaddata on that server.
Ensure that newserver is sharing (that is, exporting) the directory to which you want to synchronize and that oldserver can mount the directory.
To ensure that the automounter is working, log on to oldserver, and execute the following command:
user% cd /net/newserver/mycaddata
Ensure that the /mycaddata directory on newserver is empty.
Use the following command on oldserver.
user% filesync -s / -d /net/newserver mycaddata
When you want to resynchronize your files, issue the filesync(1M) command without options.
The filesync(1M) command works over NFS or other network-based file systems, such as AFS or DFS with Linux, HP UX, IBM AIX, and Apple OS-X, by using a solution that lets the Solaris OE mount the disk over the network. It also works with Microsoft Windows by using PC NFS.