Modular backup library allowing easy creation of both backup and storage modules
<?php
$backup = new \BackupLib\Backup(__DIR__ . '/config.yml');
// Optionally set PSR standard logger
$backup->setLogger($logger);
// Start the backup
$backup->run();
Example configuration file
settings:
notification_emails:
[email protected]: Name
[email protected]
jobs:
Job Name 1:
module: MySQL
config:
method: mysqldump
user: root
pass:
port: 3306
storage:
LocalFile:
location: /tmp/backup
Job Name 2:
module: File
config:
dirs: /var/www
exclude: cache
storage:
SSH2:
server: 127.0.0.1
user: backup
password:
key:
location: /tmp/backup
- dirs
- exclude
- user: root
- pass:
- port: 3306
- host: 127.0.0.1
- filePerTable: true
- excludedDatabases
- includedDatabases
- location = /tmp
Backup using the SSH2 extension to a remote SFTP server
Requires ext-ssh2
- hostname
- user
- pass
- pubKey
- privKey
- remoteLocation
- authType
Requires p13eater/google-helper
- clientId
- clientSecret
- accessTokenLocation
- refreshTokenLocation