SmartBackup is a program written in Rexx for eComStation and OS/2 Warp 4 (with fixpack 13 or higher) which takes the time and guess work out of backing up large directory trees to CD or DVD discs. It uses a "best fit" sorting method to minimize the number of discs needed to store all the files it finds. All files found in the given directory tree are included in the backup (even system and hidden files) except those which match a pattern in the excludes.txt file or those whose size does not meet the user's MinSize and MaxSize selections.
Before you run SmartBackup for the first time, you should run setup.cmd from the SmartBackup directory. This will set some important default values by asking you a series of questions about your system and how you plan to use SmartBackup. Many of the questions have default answers in case you either don't know or don't care about that option -- you can always change the values later by editing the file smartbackup.conf in any text editor.
SmartBackup -I InputDir -S DiscSize [options] InputDir must be enclosed in quotation marks (") if it contains spaces. DiscSize specifies the maximum capacity of each output disc. Available Options: -U Unit = the unit of measure (MB, KB or B) for DiscSize, MinSize & MaxSize. Default is MB. -R Recurse = if NO, does not find files in sub-directories. Default is YES. -E EmptyDirs = if YES, includes empty sub-directories Default is NO. -MIN MinSize = specify minimum file size to include. Default is 0. -MAX MaxSize = specify maximum file size to include. Default is infinite. -C ConfigFile = specify name of configuration file to read. -P Process = specify name of post-processing script to run. If not given, SmartBackup will prompt you. -V = show SmartBackup version. -? = show this help screen. NOTE: Most CDs hold slightly more or less than their stated capacity. If you are unable to copy a full SmartBackup project to your discs, re-run SmartBackup with a lower DiscSize value (eg. 630 or 670, etc.).
Examples:
smartbackup /? smartbackup -s 650 -i . -min 1 -max 650 smartbackup /s 716800 /U KB /I "i:\some directory\some other directory"
The user can exclude files from the backup project by adding their filename or path to the file excludes.txt one per line. Each item to be excluded uses standard wildcards (* and ?) and is matched against a file's full path and filename. If you wish to only match to pathnames, you can begin the line in excludes.txt with PATH= or if you wish to only match filenames then begin the line with FILE=. Some examples include:
This string in exclusions.txt | Would match (and exclude) these filenames from the project |
---|---|
*mp3* |
C:\Data\Music\MP3\This is a song.mp3 I:\Media Files\Sounds\Music\mp3 music\list_of_files.txt |
C:\os2\* |
C:\os2\apps\bridge.mah C:\os2\XCOPY.EXE |
*.txt |
D:\My Files\My Text Files\anyfilename.txt C:\Programs\z\readme.txt |
SmartBackup supports external scripts for post-processing its output file lists. For instance, see the included scripts whose names begin with "pp_".
To create your own post-processing scripts, you need to know the following about smartbackup.cmd's output project files (pp_*.cmd):
As of version 0.93, a skeleton post-processing script is included (\extras\pp_skeleton.cmd) which performs this parsing of the project files. Users need only add the code for the actions they wish to perform on the files contained in that project (ie. zip compression, copying to another disc or tape drive, creating an ISO or UDF file system, etc).
The included post-processing script (pp_iso.cmd) records each project list in turn to CD on- the-fly*. That is, it writes the ISO9660 CD-ROM filesystem in memory while recording the disc. This saves disc space as there is no further information written to the user's hard drive, but it also means that a fairly fast CPU and lots of memory are needed (I recommend a Pentium class CPU or better and at least 64MB of memory). It also helps to use a CD recorder with some form of buffer under-run protection, which is standard on all modern CD and DVD recorders.
The other included post-processing script (pp_zip2iso.cmd) first compresses all the files for each project list in turn using zip.exe (get it at http://www.info-zip.org/pub/infozip/ if you don't have it) and then records the zip file to CD. It again creates the CD's on the fly*. pp_zip2iso.cmd requires free hard disc space approximately equal to the output disc size in order to create the temporary compressed zip file before recording it to CD.
SmartBackup does the grunt work of sorting files from your hard drive to fit the least number of output storage devices (eg. CD-R discs). But the main script simply creates lists of which files should go onto which disc in the backup set. The included post-processing scripts provide various methods of copying those files to your backup drive/discs, such as CD recording using the ISO9660 + Joliet format, copying to UDF formatted discs (common for recordable DVDs), etc.
Before you use any of the post-processing scripts, you should edit the file smartbackup.conf to set some global preferences. You can do this by running setup.cmd from the SmartBackup directory or by directly editing the text file smartbackup.conf. Be sure the paths to mkisofs.exe and cdrecord.exe match the locations of those files on your system. Also be sure the CDRSpeed matches the speed of your writer (eg. if you have a 24x10x40 CD-RW drive and you will be using CD-R media, set CDRSpeed to a maximum of 24, but if you will be using CD-RW media set CDRSpeed to a maximum of 10). The lines which begin ISOAdditional and CDRAdditional should be set exactly as you would type extra parameters on the command line for mkisofs and cdrecord respectively. For instance, to enable verbose output and BURNFree support, do not enter CDRAdditional="-v burnfree" instead enter CDRAdditional=-v driveropts=burnfree.
The CD-ROM file system (ISO9660) DOES NOT support OS/2 extended attributes nor long filenames (though long filenames are stored in the TRANS.TBL file so you could, if needed, retrieve them later). If you must have direct long file name support or save EAs for your files, you should use pp_zip2iso.cmd which first saves the EAs and long filenames into a Zip archive before writing to the ISO file system.
* On-the-fly recording requires mkisofs and cdrecord, which you can download from http://www.os2world.com/cdwriting/ if you do not already have them.
v1.1.1
v1.1
V1.01
v1.0 - first official public release
v0.9x - first public beta test
v0.8x - second private beta test
v0.7 - first private beta test
v0.6x
v0.5x
v0.4x
v0.3
v0.2
v0.1
Making changes to the source code of SmartBackup.cmd can be neither condoned nor prevented by the author. Therefore there is absolutely no guarantee or warranty of any kind on this software. If you edit the code and then experience problems, I am in no way responsible for any loss or damage. However, if you experience problems with this software as-released by myself, then please contact me as I would like to make the program useful to as many eComStation and OS/2 users as possible.
If you report a bug, please tell me the version of OS/2 as well as any pertinent steps to recreate any errors you get when running this program.
Under no circumstances should this software be used in a mission critical environment as it is not guaranteed to be bug free nor to be 99.9% reliable.
SmartBackup is copyright 2003 by Don Eitner
SmartBackup is donation-ware. If you find it useful and appreciate the work the I have done, you are asked to send a small monetary donation to help encourage continued development and more advanced features. Donations by PayPal are currently preferred, or contact me by email to arrange other methods.
drctl014.dll included in this release carries its own copyright. See drctl014.txt for details.
As of December 2003, Don Eitner can be contacted at:
Don Eitner (freiheit@syntheticdimension.net)
Updates and other programs by Don Eitner can be downloaded from:
http://freiheit.syntheticdimension.net/ecomstation-apps.php
I would like to say thank you to the beta testers who gave feedback, reported bugs and made feature suggestions. A special thanks goes to Dimitrios "Taki" Bogiatzoules who helped me track down and correct a couple of serious but very elusive bugs.
Russian translation provided by Andrey Vasilkin