26 lines
782 B
PHP
Executable File
26 lines
782 B
PHP
Executable File
<?php
|
|
include('sqliteDB.php');
|
|
if($argv[1] == 'backup'){
|
|
//define('BACKUPSETFORDISPLAY','BackupsetDisplayFile.txt');
|
|
include('generateBackupSetFiles.php');
|
|
$logOutputFilePath = $argv[2];
|
|
getBackupOperationType();
|
|
if(!($FD_WRITE = fopen(INFOFILE,"w"))){
|
|
$errStr = "Could not open file ".INFOFILE." to write, Reason:$!";
|
|
traceLog($errStr);
|
|
return;
|
|
}
|
|
|
|
$errorFile = $jobrunningDir.PATHSEPARATOR.ERROR_DIR.PATHSEPARATOR.FAILEDFILES;
|
|
if(!($ERRORFAILEDFILE = fopen($errorFile, "w"))){
|
|
$errStr = "Could not open file $errorFile to write, Reason:$!";
|
|
traceLog($errStr);
|
|
exit_BackupCleanup();
|
|
}
|
|
#traceLog("generateBackupsetFiles");
|
|
generateBackupsetFiles();
|
|
} else {
|
|
include('generateRestoresetFiles.php');
|
|
$logOutputFilePath = $argv[2];
|
|
generateRestoresetFiles();
|
|
} |