Using NFS for Networked Backups
Subject:   simple locking
Date:   2003-03-11 12:55:47
From:   anonymous2
Backups can sometimes take more than their alotted time, and they will often take less.


1) In an area on the NFS server that all clients can read, create a "flag area" where the backup server creates a file corresponding to the name of the client who should now be backing up files.

2) Each client monitors the flag area for their name. When they see it, they begin dumping backup data to the server.

3) When a client completes, along with the backup file, they create a "completed" file (e.g. "touch `hostname`.completed"). They can shut down NFS if desired.

4) The NFS server watches for the "completed" file. When it sees it (or if nothing happens for a while, as would happen if the machine was down), it marks that host as finished and goes to the next host on the list.

5) When all hosts are done, shut down the NFS server if desired.