journey/backup
最新稳定版本:0.1.2
Composer 安装命令:
composer create-project journey/backup
包简介
Lightweight MySQL backup script for cron jobs, written in PHP.
README 文档
README
Why
Journey/Backup is a lightweight MySQL backup script written in PHP, and ideal for cron jobs. Its task is simple:
- Dump a user-selected list, or all databases on the local MySQL server
- Store those databases in a mounted directory, or on Amazon S3
Usage
Installation
The easiest way is to install via composer:
composer create-project journey/backup your-directory-name
Configuration
To configure, edit the config.php file with your own details. Here's is the sample configuration file, with helpful comments:
<?php return [ // Local database connection details 'connection' => [ 'host' => "127.0.0.1", 'username' => "mysql-username", 'password' => "mysql-password", ], // String of databases to back up, empty value will backup all databases 'databases' => [], // Location of the storage, can be absolute directory or s3 stream (s3://bucket-name) 'storage' => 's3://your-s3-bucket', // List of AWS Connection credentials 'aws' => [ 'key' => 'your-aws-key', 'secret' => 'your-aws-secret' ], // Temporary location for dump 'temp' => '/tmp' ];
Note: The host parameter is used only when databases is set to auto-discover all databases (empty array), otherwise all calls to MySQL are performed via shell operation.
Schedule
Scheduling your backups is as simple as setting up a cron job to execute the boot.php file.
统计信息
- 总下载量: 22
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-02-16