# ls /Backup2/test/
test-file
+
+#Enabling continuous mirroring.
+
+You can enable continuous mirroring by editing a few files.
+One way to make sure the mirroring works continously is to use the 'lockf' utility.
+This is one way to do it.
+
+ # mkdir /root/adm && cd /root/adm
+ # touch .lockfile
+
+Now make two scripts 'hms' and 'hmc' with the following contents inside /root/adm
+
+ # cat hms
+ hammer mirror-stream /Backup1/test /Backup2/test &
+
+ # cat hmc
+ hammer synctid /Backup1/test
+ hammer mirror-copy /Backup1/test /Backup2/test
+
+Edit '/etc/rc.local and add the following line.
+
+ (cd /root/adm; /usr/bin/lockf -k -t 0 .lockfile ./hms) &
+
+Edit 'crontab' and add the following Lines.
+
+ #Check and restart mirroring if needed every 10 minutes
+ 10 1 * * * (cd /root/adm; /usr/bin/lockf -k -t 0 .lockfile ./hms) &
+
+Edit '/etc/rc.shutdown.local' and add the following lines.
+
+ pkill -f /usr/bin/lockf -k -t 0 .lockfile ./hms
+ pkill -f hammer mirror-stream /Backup1/test /Backup2/test
+ (cd /root/adm; /usr/bin/lockf -k -t 10 .lockfile ./hmc)