hmillet/backup-commands-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

hmillet/backup-commands-bundle

Composer 安装命令:

composer require hmillet/backup-commands-bundle

包简介

Provides backup commands for your Symfony application, with the ability to push backup files to a dropbox

README 文档

README

This bundle provides symfony console commands that allow you to backup your database and your files in your dropbox

SensioLabsInsight

Installation

Step 1

Using Composer

Add the following code to your composer.json :

"require": {
    ...
    "hmillet/backup-commands-bundle": "dev-master"
    ...
},

Run a Composer update

$ php composer.phar update

Step 2

Register the bundle in the AppKernel.php file :

public function registerBundles()
{
    $bundles = array(
        ...
        new Hmillet\BackupCommandsBundle\HmilletBackupCommandsBundle(),
        ...
    );

    return $bundles;
}

Step 3 (optionnal)

Add parameters and configuration for the bundle, so it can read and write to your dropbox.

First of all, you have to get an access token. In order to get it, just run :

php app/console dropbox:setup

in app/config/parameters.yml-dist (otherwise, "composer.phar update" will remove your parameter from parameters.yml), add the line :

backup_dropbox_access_token: ~

in app/config/parameters.yml, add the line given by the above command :

backup_dropbox_access_token: your token

in app/config/config.yml, add the lines :

hmillet_backup_commands:
    dropbox:
        access_token: %backup_dropbox_access_token%

Requirements

This bundle needs (in local and remote server)

  • mysql (commandline)
  • mysqldump (commandline)
  • bunzip2 (commandline)

See the Getting Started page of the dropbox-sdk-php library.

Command line

Now from your console you can run

./app/console db:dump

and see that a new file has been saved in folder /app/tmp/dump with an hard link to the newest one.

You can run

./app/console db:restore

and choose which file you want to restore.

统计信息

  • 总下载量: 1.14k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-07-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固