Open
Description
The first time incrementalbackup is run there is an exception caused by not reading the json file (which does not exist) in the destination folder. I made the example with Tar. I found the error in the getSetting method of the Tar class
It always ($settings_file) true and at the first time _destination->read goes in exception because the .json file will not be found
<?php
/**
* Get the backup settings, # of backups and backup unix timestamps.
*
* @return mixed|object
*/
public function getSettings()
{
//$settings_file = $this->_destination->getPath() . DIRECTORY_SEPARATOR . $this->getSettingsFile();
$settings_file = $this->_destination->read(DIRECTORY_SEPARATOR . $this->getSettingsFile());
if ($settings_file) {
return json_decode($settings_file);
} // first time to backup.
else {
return (object)array(
"number" => 0,
"backups" => array()
);
}
}
Metadata
Metadata
Assignees
Labels
No labels