Perl script designed to facilitate single-command backup of pre-specified files in a single directory.
Originally designed to address backup needs of organizations using the
open-source Ebase
database without formal backup procedures. However, the
program can be set up to perform backups of any files that
can be described by naming patterns specified to the program (for instance,
*.txt
, *.mdb
, contact*.fp5
,
NAMES_.103
, etc.)
The program performs the following actions:
Because the backup file copies are placed directly into an archive file, this backup avoids problems resulting from having multiple copies of a database, etc. available for use (often, this circumstance results in users starting the wrong copy of a database).
In addition, the backup history file
contains
a comprehensive record of all backups performed using the software - something
that many nonprofits lack.
The program is written in a fashion that should allow a Perl programmer a relatively easy modification for use in Mac OS or Unix-type environments.
NOTE: One example is known where the file purging function does not
reliably delete the oldest backup file. This seems to happen
because the Perl sort()
function is not correctly
sorting the contents of a list variable containing names of backup files.
As a result, the function sometimes will leave the oldest backup and
delete a more recent backup file instead. However, the problem
cannot be reproduced in the testing/development environment, and close
examination of the Perl code has not revealed any recognizable errors.
Users are encouraged to test the purging functions on their system to
satisfy themselves that they are working correctly. If they are
not working correctly, please let us know.
The user must alter Perl commands specifying:
backup history fileused to maintain records of all files backed up.
batchmode.
Perl statments containing these specification are very clearly commented to make it easy for the programmer to locate them
The file can then easily be run using a Windows shortcut or similar to allow single-click backups. It is also possible to set the program to run using the Windows "scheduler" service if automatic execution at a predetermined schedule is desired.
Windows operating system used for development/testing. Should work on Macintosh OS, but not tested in that environment.
Installed version of Perl. (ActivePerl was used in development.)
One of either:
(Open source archiving software licensed under the Gnu Lesser General Public License)
(free to registered users of WinZip as of 2/1/2005)
7-Zip, WinZip, PKZIP or similar software to unload the provided ZIP file
zip_backup (17 Kb zip file, 02Nov2007 revision)
Modification to allow use on Mac OS and Linux
Modification to allow backup of sub-directories