SCOUG Logo


Next Meeting: Sat, TBD
Meeting Directions


Be a Member
Join SCOUG

Navigation:


Help with Searching

20 Most Recent Documents
Search Archives
Index by date, title, author, category.


Features:

Mr. Know-It-All
Ink
Download!










SCOUG:

Home

Email Lists

SIGs (Internet, General Interest, Programming, Network, more..)

Online Chats

Business

Past Presentations

Credits

Submissions

Contact SCOUG

Copyright SCOUG



warp expowest
Pictures from Sept. 1999

The views expressed in articles on this site are those of their authors.

warptech
SCOUG was there!


Copyright 1998-2024, Southern California OS/2 User Group. ALL RIGHTS RESERVED.

SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group. OS/2, Workplace Shell, and IBM are registered trademarks of International Business Machines Corporation. All other trademarks remain the property of their respective owners.

The Southern California OS/2 User Group
USA

SCOUG-HELP Mailing List Archives

Return to [ 03 | August | 2002 ]

<< Previous Message << >> Next Message >>


Date: Sat, 3 Aug 2002 15:52:47 PST7
From: Harry Chris Motin <hmotin@attglobal.net >
Reply-To: scoug-help@scoug.com
To: scoug-help@scoug.com
Subject: SCOUG-Help: Re: Drive Image Backups


6
=====================================================
If you are responding to someone asking for help who
may not be a member of this list, be sure to use the
REPLY TO ALL feature of your email program.
=====================================================
This is a multi-part message in MIME format.

Content Type: text/plain

Content-Transfer-Encoding: 7bit

Sandy,

The attached REXX script for automating you use of clback.exe may be
useful to you. Please note the following:

1. You must place the script in the same directory as clback.exe,
otherwise it will not work.

2. The script is best run from the commandline and not from PMREXX. You
can create a program object on your desktop to run it. If you do, use
"....\BA2K.CMD", without the parentheses, on the "Path and file name"
entry on the "Program" tab of your program object.

"....\" is the path to where clback.exe resides. For example, on your
system it might be:

C:\BA2K\BA2K.CMD

The Working directory" on the "Program" tab should also be the path to
where clback.exe resides

3. The script presents you with a texted window selection choice. You
can select backing up c:\, or d:\, or e:\, or f:\ or g:\

4. The script searches for previous backups of c:\, d:\, etc. on your
H:\ drive. It looks for files of the following name types: cfull*.dat,
dfull*.dat, efull*.dat, ffull*.dat or gfull*dat on your H:\, depending
on whether you selected the c:\ backup, or the d:\ backup, etc.

5. If the program finds a previous backup of the correct name type, it
tries to determine whether or not you have enough room in it (whether
its still small enough) for you to place another backup in it.

6. If its small enough to receive another backup, the program tells you
and allows you to select it, or name another file on H:\ (if that file
does not exist, the clback utility will create it as it backs up).

7. If your existing file is too big to receive another backup, the REXX
script prompts you to name another file. You simply supply the file
name, like "cfull080302.dat". You do not have to give the full path,
like "H:\cfull080302.dat".

8. If the program cannot find an existing backup file on H:\ of the
correct name type, it prompts you to name a new file. Again, only give
the name of the file and not its full path.

9. In order for the program to correctly determine whether or not an
existing backup file can receive another backup, it has to know the
maximum size of you 5 different backups. You must supply that
information on lines 31 through 35 of the script. You must change the
values of the "CMaxSize", "DMaxSize", "ECMaxSize", "FMaxSize" and
"GMaxSize" variables to the maximum sizes, in bytes, of your C:\, D:\,
E:\, F:\ and G:\ backups, respectively. Right now these variables are
each equal to zero. For example, you mentioned that you can get 5 of the
D:\ backups into its *.dat backup file container before you reach the
2.1GB limit. I assume that your D:\ backup is the largest. Therefore,
perhaps each D:\ backup is a maximum of 2254857830/5 = 450971566 bytes
in size (450971566 bytes = 2.1GB/5). If so, then that is the number you
place on line 32 of the REXX script. Remove the 0 and replace it with
450971566.

Use a ASCII, or text, editor to edit the REXX script. It's an ASCII
file. In a similar fashion edit lines 31 and 33-35. The script will not
correctly tell you whether or not you can place additional backups in
existing files, until you edit lines 31-35.

Good luck. Hope it works well for you. Let me know if you have any
problems! I tried to test it for proper working, but I did not exercise
everything. I know that it correctly gives your instructions to
clback.exe.
HCM

______________________________________________________________________________

Sandy Shapiro wrote:
>
> =====================================================
> If you are responding to someone asking for help who
> may not be a member of this list, be sure to use the
> REPLY TO ALL feature of your email program.
> =====================================================
>
> >Great. Let me know, if you need any help constructing the script. HCM
>
> I would LOVE some help.
>
> My batch file has the following five lines:
>
> clback -ir c:\* -d h:\cfull.dat -name Cdrive -compare
> clback -ir d:\* -d h:\dfull.dat -name Ddrive -compare
> clback -ir e:\* -d h:\efull.dat -name Edrive -compare
> clback -ir f:\* -d h:\ffull.dat -name Fdrive -compare
> clback -ir g:\* -d h:\gfull.dat -name Gdrive -compare
>
> I can run it about five times before one of the .dat files (ffull.dat)
> approaches the 2.1 gb limit.
>
> If I changed the name to ffull1.dat, ffull2.dat, etc. that would allow for
> complete automation.
>
> What do you suggest?
>
> Thanks,
> Sandy
>
> =====================================================
>
> To unsubscribe from this list, send an email message
> to "steward@scoug.com". In the body of the message,
> put the command "unsubscribe scoug-help".
>
> For problems, contact the list owner at
> "rollin@scoug.com".
>
> =====================================================


Content Type: text/plain

name="BA2K.CMD"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="BA2K.CMD"

/*REXX script for commandline operation of Back Again 2000, version 2.10d*/

/*Begin registering the REXXUtil Library, if not already registered*/
REXXUtilityFlag = RXFUNCQUERY("SYSLOADFUNCS")
IF REXXUtilityFlag \= 0 THEN DO
CALL RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
CALL SysLoadFuncs
END /*Ends "IF REXXUtilityFlag \= 0 THEN DO" Section*/
/*End registering the REXXUtil Library, if not already registered*/

/*Begin specifying the commandline commands for BA2K*/
CommandLine1A = "clback.exe -ir C:\* -d "
CommandLine1B = " -name Cdrive -compare"
CommandLine2A = "clback.exe -ir D:\* -d "
CommandLine2B = " -name Ddrive -compare"
CommandLine3A = "clback.exe -ir E:\* -d "
CommandLine3B = " -name Edrive -compare"
CommandLine4A = "clback.exe -ir F:\* -d "
CommandLine4B = " -name Fdrive -compare"
CommandLine5A = "clback.exe -ir G:\* -d "
CommandLine5B = " -name Gdrive -compare"
/*End specifying the commandline commands for BA2K*/

/*Begin specifying data on the backup types*/
CMaxSize = 0
DMaxSize = 0
EMaxSize = 0
FMaxSize = 0
GMaxSize = 0
MaxHPFSFileSize = 2254857830 /*that is, 2.1GB*/
/*End specifying data on the backup types*/

/*Begin finding the File Spec information on this program, BA2K1.CMD, and assigning its value to the variable, ProgramLocation, here in this program*/
PARSE SOURCE OperatingSystem HowCalled FileSpec
ProgramLocation = ""
FileSpecPortion = FileSpec
DO UNTIL FileSpecPortion = ""
PARSE Var FileSpecPortion FirstPart "\" SecondPart
SELECT
WHEN ProgramLocation = "" & SecondPart \= "" THEN ProgramLocation = FirstPart
WHEN ProgramLocation \= "" & SecondPart \= "" THEN ProgramLocation = ProgramLocation"\"FirstPart
OTHERWISE NOP
END /*Ends "SELECT" Section*/
FileSpecPortion = SecondPart
END /*Ends "DO UNTIL FileSpecPortion = """ Section*/
/*End finding the File Spec information on this program, BA2K.CMD, and assigning its value to the variable, ProgramLocation, here in this program*/

/*Begin finding the current date and time*/
CurrentDate = DATE(S)
/*End finding the current date and time*/

/*Begin specifying what the REXX script does and requesting the desired service*/
SAY ""
SAY "This REXX program automates the task of creating Back Again 2K backups."
SAY "Please select one of the following:"
SAY ""
SAY " 1. Backup C:\. Please type a '1', or a 'C', or a 'c' and"
SAY " then press the ENTER key."
SAY ""
SAY " 2. Backup D:\. Please type a '2', or a 'D', or a 'd' and"
SAY " then press the ENTER key."
SAY ""
SAY " 3. Backup E:\. Please type a '3', or a 'E', or a 'e' and"
SAY " then press the ENTER key."
SAY ""
SAY " 4. Backup F:\. Please type a '4', or a 'F', or a 'f' and"
SAY " then press the ENTER key."
SAY ""
SAY " 5. Backup G:\. Please type a '5', or a 'G', or a 'g' and"
SAY " then press the ENTER key."
SAY ""
SAY " 6. Press the ENTER key, only, if you wish to to exit."
SAY ""
PARSE UPPER PULL SelectedService
/*End specifying what the REXX script does and requesting the desired service*/

/*Begin specifying the desired backup service*/
SELECT
WHEN SelectedService = "1" | SelectedService = "C" THEN DO
BackupDrive = "C:"
BackupPath = "H:\cfull*.DAT"
MaxSize = CMaxSize
CALL BACKUPPATH
CommandLine = CommandLine1A||BackupFilePath||CommandLine1B
END /*Ends "WHEN SelectedService = "1" | SelectedService = "C" THEN DO" Section*/

WHEN SelectedService = "2" | SelectedService = "D" THEN DO
BackupDrive = "D:"
BackupPath = "H:\dfull*.DAT"
MaxSize = DMaxSize
CALL BACKUPPATH
CommandLine = CommandLine2A||BackupFilePath||CommandLine2B
END /*Ends "WHEN SelectedService = "2" | SelectedService = "D" THEN DO" Section*/

WHEN SelectedService = "3" | SelectedService = "E" THEN DO
BackupDrive = "E:"
BackupPath = "H:\efull*.DAT"
MaxSize = EMaxSize
CALL BACKUPPATH
CommandLine = CommandLine3A||BackupFilePath||CommandLine3B
END /*Ends "WHEN SelectedService = "3" | SelectedService = "E" THEN DO" Section*/

WHEN SelectedService = "4" | SelectedService = "F" THEN DO
BackupDrive = "F:"
BackupPath = "H:\ffull*.DAT"
MaxSize = FMaxSize
CALL BACKUPPATH
CommandLine = CommandLine4A||BackupFilePath||CommandLine4B
END /*Ends "WHEN SelectedService = "4" | SelectedService = "F" THEN DO" Section*/

WHEN SelectedService = "5" | SelectedService = "G" THEN DO
BackupDrive = "G:"
BackupPath = "H:\gfull*.DAT"
MaxSize = GMaxSize
CALL BACKUPPATH
CommandLine = CommandLine5A||BackupFilePath||CommandLine5B
END /*Ends "WHEN SelectedService = "5" | SelectedService = "G" THEN DO" Section*/

OTHERWISE NOP
END /*Ends "SELECT" Section*/
/*End specifying the desired backup service*/

/*Begin the selected backup*/
SELECT
WHEN Response \= "" THEN INTERPRET "CommandLine"
OTHERWISE DO
SAY "Sorry, you failed to enter a filename for backing up your data!"
SAY " This program will now end. Press any key."
KeyResponse = SYSGETKEY("ECHO")
END /*Ends "OTHERWISE DO" Section*/
END
/*End the selected backup*/

/*Begin closing out the script and exiting*/
FINISH: /*End the script*/
/*Begin deregistering the REXX Utility functions and closing out this script*/
IF REXXUtilityFlag \= 0 THEN CALL SysDropFuncs
/*End deregistering the REXX Utility and closing out this script*/
EXIT
/*End closing out the script and exiting*/

/*Begin getting specifications on any existing saved backups*/
BACKUPPATH:
Backups. = ""
RC = SYSFILETREE(BackupPath, "Backups", "FO")
RC = SYSCLS()
SAY ""
SELECT
WHEN Backups.0 = 0 THEN DO
SAY "Apparently, you have no saved backups for "BackupDrive"."
SAY " Please provide the name of your new backup file."
SAY " write the name and then press the ENTER key."
PARSE PULL Response
IF TRANSLATE(RIGHT(Response ,4)) \= ".DAT" THEN Response = Response".DAT"
BackupFilePath = "H:\"Response
END /*Ends "WHEN Backups.0 = 0 THEN DO" Section*/

WHEN Backups.0 > 0 THEN DO
FoundSerialDateTime. = ""
FoundSize. = ""
FoundMBSize. = ""
DO J = 1 TO Backups.0 BY 1
BackupData. = ""
FoundBackup = Backups.J
RC = SYSFILETREE(FoundBackup, "BackupData", "T")
Data = BackupData.1
PARSE VAR Data Year "/" Month "/" Day "/" Hours "/" Minutes Size Remainder
FoundDate = Year"/"Month"/"Day
SerialDate = DATE("B",FoundDate,"O")
SerialTime = Hours/24 + Minutes/(60*24)
FoundSerialDate.J = SerialDate + SerialTime
FoundSize.J = Size
FoundMBSize.J = Size/2**20
END J /*Ends "DO J = 0 TO Backups.0 BY 1" Section*/

LatestBackup = 0

DO J = 1 TO Backups.0 BY 1 /*Pick the last backup*/
IF FoundSerialDate.J > LatestBackup THEN DO
LatestBackup = FoundSerialDate.J
BackupNumber = J
END /*Ends "IF FoundSerialDate.J > LatestBackup THEN DO" Section*/
END J /*Ends "DO J = 0 TO Backups.0 BY 1" Section*/

EstimatedReserve = MaxHPFSFileSize - (FoundSize.BackupNumber + MaxSize)

SELECT
WHEN EstimatedReserve > 0 THEN DO
SAY "Found backup file,"
SAY ""
SAY " "Backups.BackupNumber
SAY ""
SAY "It has a present size of "FoundSize.BackupNumber" bytes ("FoundMBSize.BackupNumber" MB) and can"
SAY " probably hold this next backup without exceeding the 2.1GB"
SAY " file size limit. Save this next backup to this file?"
SAY ""
SAY " 1. If yes, type and enter a '1', 'Y' or 'y'."
SAY " 2. If no, enter the name of your new backup file."
PARSE PULL Response
RC = SYSCLS()
SELECT
WHEN Response = "1" | Response = "Y" | Response = "y" THEN BackupFilePath = Backups.BackupNumber

OTHERWISE DO
IF TRANSLATE(RIGHT(Response ,4)) \= ".DAT" THEN Response = Response".DAT"
BackupFilePath = "H:\"Response
END /*/*Ends "OTHERWISE DO" Section*/*/
END /*Ends "SELECT" Section*/
END /*Ends "WHEN EstimatedReserve > 0 THEN DO" Section*/

OTHERWISE DO
SAY "Found backup file,"
SAY ""
SAY " "Backups.BackupNumber
SAY ""
SAY "It has a present size of "FoundSize.BackupNumber" bytes ("FoundMBSize.BackupNumber" MB). It cannot"
SAY " hold this next backup without exceeding the 2.1GB file size"
SAY " limit. Therefore, please enter the name of a new backup file."
PARSE PULL Response
IF TRANSLATE(RIGHT(Response ,4)) \= ".DAT" THEN Response = Response".DAT"
BackupFilePath = "H:\"Response
RC = SYSCLS()
END /*Ends "OTHERWISE DO" Section*/
END /*Ends "SELECT" Section*/
END /*Ends "WHEN Backups.0 > 0 THEN DO" Section*/

OTHERWISE NOP
END /*Ends "SELECT" Section*/
RETURN


<< Previous Message << >> Next Message >>

Return to [ 03 | August | 2002 ]



The Southern California OS/2 User Group
P.O. Box 26904
Santa Ana, CA 92799-6904, USA

Copyright 2001 the Southern California OS/2 User Group. ALL RIGHTS RESERVED.

SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group. OS/2, Workplace Shell, and IBM are registered trademarks of International Business Machines Corporation. All other trademarks remain the property of their respective owners.