demi/dropbox-backup
最新稳定版本:2.0.0
Composer 安装命令:
composer require demi/dropbox-backup
包简介
Yii2 console command for making site backups and upload it to your dropbox account
README 文档
README
Yii2 console command for making site backups and upload it to your dropbox account (Dropbox API v2).
Installation
Run
composer require "demi/dropbox-backup" "~2.0"
Configurations
To get started, configure backup component (you do not need to install it).
Then create new dropbox application and get dropbox AppKey and AppSecret.
Configure /console/config/main.php:
return [ 'controllerMap' => [ 'backup' => [ 'class' => 'demi\backup\dropbox\BackupController', // Name of \demi\backup\Component in Yii components. // Default Yii::$app->backup 'backupComponent' => 'backup', // Dropbox app identifier 'dropboxAppKey' => '65pwea8lqgbq5dm', // Dropbox app secret 'dropboxAppSecret' => 'k2x0sl8a7wfj7h9', // Access token for user which will be get up backups. // To get this navigate to // https://www.dropbox.com/developers/apps/info/<AppKey> // and press OAuth 2: Generated access token button. 'dropboxAccessToken' => 'kFflkUk7K3AAAAAAAAAAEh2tNeQbPbOX8Z11wk0rSdFfYMb5B5VX6kTvkcWz5N8R', // Path in the dropbox folder where would be saved backups 'dropboxUploadPath' => '/', // If true: will be deleted files in the // dropbox when $expiryTime has come 'autoDelete' => true, // Number of seconds after which the file is // considered deprecated and will be deleted. 'expiryTime' => 30 * 86400, // 30 days // @see more options here [\console\controllers\BackupController] ], ], ];
Usage
Run console command:
php yii backup
It will generated current site backup(based on backup component) and upload it to your dropbox account.
统计信息
- 总下载量: 2.26k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 10
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-or-later
- 更新时间: 2015-08-10