iobotis / php-incremental-backup Goto Github PK
View Code? Open in Web Editor NEWPHP incremental backup library
License: MIT License
PHP incremental backup library
License: MIT License
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()
);
}
}
Create a composer json to the root directory of the project.
Create new unit tests that throw our newly created exceptions and test their behaviour.
Create some unit tests for the Tar class.
Update outdated examples in Readme file.
Create a trait for settings for Backup\Destination\AbstractBase.
Create unit tests for the CommandFactory.
Support borg tool generation in Factory class.
Add a function in Tar class to exclude certain subdirectories from the archive.
setExludedSubDirectories
same way as for Duplicity class.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.