Perl Mirror.pl Script
Sometimes, when you need to get somethings done, the most simple of the scripts can do the job much better than hefty softwares out there.
I like to keep a mirror of laptop hard disk on a portable hard disk for safe keeping and also while traveling. And there is a perfect script to do just that
I do not need to carry a bulky hardware with me and when I do need a file, I simply plug my drive into a Netbook and see replica of what I have on my main computer in the drive.
I like the script for its simplicity. It can be programmed into your CRON and can execute standalone. It does a full mirror sync (exact replica of the hard drive) or one way dumping of all latest files. It however, does not copy the config files/directories starting with a dot “.”.
Written in Perl, it can be run off any operating system with a Perl interpreter (Linux, Unix, Windows, Mac OS). And as the author says:
Yes, I know that there are other tools out there, and I am especially aware of ‘rsync’, but there was a need for a PERL-based mirror tool. I wrote one that only copies the file if the size is different or the source timestamp is newer than the destination timestamp. It works extra-good if it is copying to/from the same filesystem or when the filesystems have the same time.