dimsav / backup-engine
This package is abandoned and no longer maintained.
No replacement package was suggested.
A library used to backup project files and databases, and upload backups to dropbox.
v1.0.0-beta1
2014-06-06 13:38 UTC
Requires
- php: >=5.3.0
- andreafabrizi/dropbox-uploader: 0.13
- dimsav/unix-zipper: 1.*
- monolog/monolog: 1.*
Requires (Dev)
- henrikbjorn/phpspec-code-coverage: 1.*@dev
- phpspec/phpspec: 2.0.*@dev
- phpunit/phpcov: *
- phpunit/phpunit: 4.0.*
This package is auto-updated.
Last update: 2024-07-29 03:22:10 UTC
README
Try this alternative instead: https://github.com/dimsav/backupish
Documentation
This is a library, written in php, used to backup your project's files and databases.
Installation
- Clone the repository
- Install the composer dependencies:
composer install
- Create a file config/config.php according config/config.ini.php
Execution
Run php backup.php
Features
- Multiple projects can be backed up at once
- Custom selection of backup directories per project
- Custom selection of excluded paths
- Password protection of backup files (.zip)
- Detailed logs are saved to the server and are uploaded to dropbox.
Requirements
- This script can only be used in Unix systems (Linux/Mac), as we are using the zip command of the system.
- The function exec() should be available as we use it to zip our backups.
- The user executing the script must be able to write in the backups folder.
- The cURL extension is required if you want to use the dropbox uploader.
Instructions
- Copy config.ini.php to config.php.
- Edit config.php to define your projects to be backed up.
- Run cron.php using the command line or a web server.
- See the magic happen!
Defining your projects is a piece of cake:
/* * Define in this array the projects you wish to backup. * * The key of the array marks the name of the project * and it is used for folder and file names. So better * use alphanumeric characters with slash/underscores. */ "projects" => array( /* * Here we define a project to be backed-up. * For this project, we want to backup only * the database. We use the default host and * port, and we override the username and password. * * For this project we are overriding the default * password with another one. */ "project-1" => array( "database" => array( "name" =>"db-name", "username"=>"db-user", "password"=>"db-pass", ), "password" => "another-secret", ), /* * For this project we backup both some files * and the database. * * We use the default database settings, so we * define only the database name. * * Under "paths" we put a list of absolute paths * of directories or files. * * Under "excludes" we put a list of absolute paths * of directories or files that should not be * included in the compressed backup files. The * contents of these directories will be skipped * recursively. */ "project-2" => array( "database" => array( "name"=>"db-name", ), "paths" => array( "/absolute/project/folder/path", "/absolute/project/file/text.txt", ), "excludes" => array( "/absolute/project/folder/path/cache", "/absolute/project/folder/path/logs", "/absolute/project/folder/path/bigfile.tar", ), ), /* * Here we disable for project-3 the default password, * as we don't want any password for this project. */ "project-3" => array( "paths" => array( "/project/folder", ), "password" => null, ) ),