Fix for #2191 - n the packaged version, backups can neither be created nor restored.
This commit is contained in:
parent
6eb888ecdc
commit
bd3828c97c
|
@ -337,14 +337,15 @@ class Backup
|
|||
*/
|
||||
private function doIt()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
if ($this->loglevel=='debug') {
|
||||
$this->addLogItem("-I- ".date("Ymd-H:i:s")." doIt\n");
|
||||
}
|
||||
$command = dirname(__FILE__).'/../bin/backup.sh'.
|
||||
" {$this->tmpDir}".
|
||||
" {$this->tmpFile}".
|
||||
" {$this->statusFile}".
|
||||
" >> {$this->logFile} &";
|
||||
$command = $CC_CONFIG['storageBinDir']."/backup.sh"
|
||||
." {$this->tmpDir}"
|
||||
." {$this->tmpFile}"
|
||||
." {$this->statusFile}"
|
||||
." >> {$this->logFile} &";
|
||||
$res = system("$command");
|
||||
sleep(2);
|
||||
if ($this->loglevel=='debug') {
|
||||
|
|
|
@ -82,6 +82,7 @@ class Restore {
|
|||
*/
|
||||
function openRestore($sessid, $backup_file)
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
if ($this->loglevel=='debug') {
|
||||
$this->addLogItem("-I-".date("Ymd-H:i:s")." doRestore - sessid:$sessid\n");
|
||||
}
|
||||
|
@ -95,7 +96,7 @@ class Restore {
|
|||
file_put_contents($this->statusFile, 'working');
|
||||
|
||||
//call the restore script in background
|
||||
$command = dirname(__FILE__).'/../bin/restore.php';
|
||||
$command = $CC_CONFIG['storageBinDir'].'/restore.php';
|
||||
$runLog = "/dev/null";
|
||||
$params = "{$backup_file} {$this->statusFile} {$this->token} {$sessid}>> $runLog &";
|
||||
$ret = system("$command $params", $st);
|
||||
|
@ -273,7 +274,7 @@ class Restore {
|
|||
if ($this->loglevel=='debug') {
|
||||
$this->addLogItem("-I- ".date("Ymd-H:i:s")." addFileToStorage - file:$file | type:$type | id:$gunid\n");
|
||||
}
|
||||
require_once "XmlParser.php";
|
||||
require_once("XmlParser.php");
|
||||
$tree = XmlParser::parse($file);
|
||||
$mediaFileLP = str_replace('.xml','',$file);
|
||||
$mediaFileLP = ($type=='audioClip' && is_file($mediaFileLP))?$mediaFileLP:'';
|
||||
|
@ -304,7 +305,6 @@ class Restore {
|
|||
} else {
|
||||
// add as new
|
||||
$parid = $this->gb->_getHomeDirIdFromSess($this->sessid);
|
||||
#$this->addLogItem("Parid:$parid\n");
|
||||
$name = $tree->children[0]->children[0]->content;
|
||||
if (empty($name)) {
|
||||
$name = $tree->attrs['title']->val;
|
||||
|
|
|
@ -58,6 +58,7 @@ $CC_CONFIG = array(
|
|||
'accessDir' => dirname(__FILE__).'/../../storageServer/var/access',
|
||||
'pearPath' => dirname(__FILE__).'/../../../../usr/lib/pear',
|
||||
'cronDir' => dirname(__FILE__).'/../../storageServer/var/cron',
|
||||
'storageBinDir' => dirname(__FILE__).'/../bin',
|
||||
'isArchive' => FALSE,
|
||||
'validate' => TRUE,
|
||||
'useTrash' => TRUE,
|
||||
|
|
|
@ -53,12 +53,13 @@ $CC_CONFIG = array(
|
|||
'StationPrefsGr'=> 'StationPrefs',
|
||||
'AllGr' => 'All',
|
||||
'TrashName' => 'trash_',
|
||||
'storageDir' => dirname(__FILE__).'/../../storageServer/var/stor',
|
||||
'bufferDir' => dirname(__FILE__).'/../../storageServer/var/stor/buffer',
|
||||
'transDir' => dirname(__FILE__).'/../../storageServer/var/trans',
|
||||
'accessDir' => dirname(__FILE__).'/../../storageServer/var/access',
|
||||
'pearPath' => 'ls_lib_dir/pear',
|
||||
'cronDir' => dirname(__FILE__).'/../../storageServer/var/cron',
|
||||
'storageDir' => dirname(__FILE__).'/../../storageServer/var/stor',
|
||||
'bufferDir' => dirname(__FILE__).'/../../storageServer/var/stor/buffer',
|
||||
'transDir' => dirname(__FILE__).'/../../storageServer/var/trans',
|
||||
'accessDir' => dirname(__FILE__).'/../../storageServer/var/access',
|
||||
'pearPath' => 'ls_lib_dir/pear',
|
||||
'cronDir' => dirname(__FILE__).'/../../storageServer/var/cron',
|
||||
'storageBinDir' => dirname(__FILE__).'/../../../../bin',
|
||||
'isArchive' => FALSE,
|
||||
'validate' => TRUE,
|
||||
'useTrash' => TRUE,
|
||||
|
|
Loading…
Reference in New Issue