Synchronizing Files Between a Sun Server and a Linux Laptop
The procedure in this section explains how to synchronize a home directory between a Sun server and a Linux laptop that is using DHCP.
To Synchronize Files Between a Sun Server and a Linux Laptop
Ensure that the laptop is sharing (that is, exporting) the directory to which you want to synchronize.
You must add the directory and server name to which you want to synchronize in the /etc/exports file on the Linux laptop. For example, if the server name is SunServer123 and the directory is your user directory on that server (that is, /home/user_name), then add the following line to the /etc/exports file:
Activate the changes to the /etc/exports file on the Linux laptop, execute the following command:
user% exportfs a
See exportfs(1B) for more information on how to use sharing in Linux.
Ensure that the Sun 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.
To ensure that the automounter is working, log on to sunserver123, and execute the following command:
user% cd /net/dhcp_address_of_laptop/home/user_name
Ensure that the directory on the laptop to which you are synchronizing is empty.
Execute the following command:
user% filesync -s /home/user_name -d /net/dhcp_address_of_laptop/home/user_name Mail
This command copies your local mail directory from the Sun server to the laptop.
Wait 10 minutes for the laptop to be unmounted from the server.
The Solaris OE automount daemon has a default timeout of 10 minutes before it unmounts an inactive NFS mount. Thus, you must wait 10 minutes for the Sun server to unmount the laptop. For instruction on how to change the default timeout value, see automount(1M).
When you want to resynchronize your files, issue the filesync(1) command without options.