Need to mirror a directory to a remote server... Servers are HP-UX PA-RISC (64-bit).
We are currently using a script written in Perl to mirror a local directory to a remote server. This script is run every 5 minutes. The problem is that when there are numerous files in the directory, sometimes the copy doesn't complete before the next run is started. The file compare seems to be the bottleneck.
I'm curious if anyone has any alternative suggestions to accomplish this.
Background... Files are continuously created in the directory at varying frequency. Files older than 2 days are purged each night. Files are approximately 8M in size.
The script performs the following tasks:
A shell script first zips the files in the directory to approximately 2M using gzip.
Shell script then calls a Perl script that:
Confirms existence of directories, that they are of directory type, and directories are in readable status for both local and remote paths.
Confirms existence of files in the local directory.
Confirms a match of file, modified date, and size between local and remote paths.
Any non-matching file is copied from the local path to the remote path.
Any thoughts are appreciated!
We are currently using a script written in Perl to mirror a local directory to a remote server. This script is run every 5 minutes. The problem is that when there are numerous files in the directory, sometimes the copy doesn't complete before the next run is started. The file compare seems to be the bottleneck.
I'm curious if anyone has any alternative suggestions to accomplish this.
Background... Files are continuously created in the directory at varying frequency. Files older than 2 days are purged each night. Files are approximately 8M in size.
The script performs the following tasks:
A shell script first zips the files in the directory to approximately 2M using gzip.
Shell script then calls a Perl script that:
Confirms existence of directories, that they are of directory type, and directories are in readable status for both local and remote paths.
Confirms existence of files in the local directory.
Confirms a match of file, modified date, and size between local and remote paths.
Any non-matching file is copied from the local path to the remote path.
Any thoughts are appreciated!