automate backing up uploaded files

Hi,

We are running FTP Server on UNIX (Solaris 9). Users login and upload (also download) files whenever required. Now, we have to automate the process which makes a copy of every file immediately after it gets uploaded to the FTP server (by any user).

I've ruled out rsync,mirror,filesync etc. as "syncing/mirroring the users home_dirs and backup_dir" would not work out for this requirement. In other words, if i delete files from backup_dir then they should not come again from users' home_dir.

Thanks in advance,

Prvn

You can use good old find and cp. However, regardless of what you use, you will need to run your command/script through cron. So use fuser to make sure that a file is not being written to when you back it up.

Run find, get the list of files added since the last time you ran find. For each file, check if it is being written to, if not, take a backup.

Thanks blowtorch.

I succeeded achieving this.

Thanks