Synchronization of 2 directories

I have 2 hosts (server and client), on the client side I mount remote directory (through NFS). How can I synchronize content of 2 directories (one on the client, and one on the server, mounted to the client)? i.e. when client is connected to the server synchronization process is automatically started.

BZW is there any other way to synchronize data on different hosts?

Note: I use Fedora 5/6

Do you absolutely want to have the directory NFS mounted? You can use rsync to keep your files in sync on different systems (it will, of course mean double the space utilisation).

Now I use NFS to have an access to the remote filesystem's files, also I use it to copy changes made on the server to the client host (also 2 synchronized copies). If rsync will solve the problem, I'll use rsync instead of NFS for this purpose, but I'll still use NFS to access the files that are on the server's filesystem only.

Thank you for advance.

you can also rsync the mounted nfs directory with the local dir on the client, so you don't have to install rsync on the Server (if it's not installed)

It's a good idea but I experience some strange NFS behaviour. When I copy file to the mounted disk the file is created but I recieve an error message. When I try to copy this file again (the file already exists) no errors occured.

What is the error message ? Most likely wrong permissions are involved.