************************ * Axsapt Backup Script * ************************ set safety off public cBackup_Path, cPath_7za, cArchive_Name, cDateTimeStamp, cFullBackupPath, cCommand, cScript_Name, cQueue ******************************************************************************* * The following lines define your backup sets. * * The first number in the Dimension line represents the number of backup sets * ******************************************************************************* Dimension cQueue[3,2] ******************************************************************************* * Each pair of statements represents the name of the backup set and the path * * of the files to backup * ******************************************************************************* cQueue[1,1] = [home] cQueue[1,2] = ["c:\program files\vision\home\sample\"] cQueue[2,1] = [vphome] cQueue[2,2] = ["c:\program files\visipay\vphome\vpsample\"] cQueue[3,1] = [eBOS_Data] cQueue[3,2] = ["c:\eBOS_Data\"] *return cScript_Name = "Axsapt Backup" cBackUp_Path="X:\Axsapt_Backup\Test_Backup_Directory" cPath_7za="X:\Axsapt_Backup" cArchive_Name="" cDateTimeStamp = TrimStr(year(date()))+right("0"+TrimStr(Month(date())),2)+right("0"+TrimStr(Day(date())),2) +"_"+right("0"+TrimStr(hour(datetime())),2)+right("0"+TrimStr(minute(datetime())),2)+right("0"+TrimStr(sec(datetime())),2) cFullBackupPath = cBackup_Path+"\"+cDateTimeStamp *messagebox(cDateTimeStamp) *messagebox(cFullBackupPath) * Use try/catch/finally/endtry to avoid error being displayed try mkdir "&cBackup_Path" catch to oErr * do nothing finally * do nothing endtry mkdir "&cFullBackupPath" for nIndex = 1 to alen(cQueue,1) *messagebox(cQueue[nIndex,1]) *messagebox(cQueue[nIndex,2]) cCommand = cPath_7za+"\7za.exe a -tzip " + cFullBackupPath + "\" + cQueue[nIndex,1] + " " + [&cQueue[nIndex,2]] messagebox(cCommand) !&cCommand endfor *cCommand = cPath_7za+"\7za.exe a -tzip " + cFullBackupPath + "\home " + ["c:\program files\vision\home\"] *messagebox(cCommand) *!&cCommand *cCommand = cPath_7za+"\7za.exe a -tzip " + cFullBackupPath + "\Vphome " + ["c:\program files\visipay\vphome\"] *messagebox(cCommand) *!&cCommand function TrimStr parameter tStr do case case type("tStr") = 'N' cStr = alltrim(str(tStr)) case type("tstr") = 'C' cStr = alltrim(tStr) otherwise messagebox(type("tstr")) endcase return cStr endfunc