定制 kachkaev/dropbox-backup-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

kachkaev/dropbox-backup-bundle

Composer 安装命令:

composer require kachkaev/dropbox-backup-bundle

包简介

Allows backing up your mysql database to dropbox using symfony console

README 文档

README

This bundle allows you backing up your mysql database to dropbox using symfony console command.

Uses modified version of DropboxUploader by hakre.

IMPORTANT

This repository is abandoned and has not been updated since 2013. Please enjoy these alternatives with a far greater functionality:

Installation

Composer

Add the following dependency to your project’s composer.json file:

    "require": {
        // ...
        "kachkaev/dropbox-backup-bundle": "dev-master"
        // ...
    }

Now tell composer to download the bundle by running the command:

$ php composer.phar update kachkaev/dropbox-backup-bundle

Composer will install the bundle to vendor/kachkaev directory.

Adding bundle to your application kernel

// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Kachkaev\DropboxBackupBundle\KachkaevDropboxBackupBundle(),
        // ...
    );
}

Configuration

Here is the default configuration for the bundle:

kachkaev_dropbox_backup:  
    database:             

        # Only pdo_mysql is supported at the moment
        driver:               pdo_mysql 
        host:                 localhost 
        port:                 ~ 
        dbname:               ~ # Required
        user:                 ~ # Required
        password:             ~ # Required

        # Directory relative to Dropbox root
        output_directory:     

        # Output filename consists of prefix and timestamp
        output_fileprefix:    

        # Set to true to compress .sql to .tgz
        output_compression:   false 

    # Dropbox account credentials (use parameters in config.yml and store real values in prameters.yml)
    dropbox:              
        user:                 ~ # Required
        password:             ~ # Required

It is recommended to keep real values for logins and passwords in your parameters.yml file, e.g.:

# app/config/config.yml
kachkaev_dropbox_backup:
    database:
        driver:   %database_driver%
        host:     %database_host%
        port:     %database_port%
        dbname:   %database_name%
        user:     %database_user%
        password: %database_password%
        
        output_directory: db-backup/
        output_fileprefix: db_
        output_compression: true
    dropbox:
        user: %dropbox_user%
        password: %dropbox_password%
# app/config/parameters.yml
	# ...
    database_driver: pdo_mysql
    database_host: localhost
    database_port: null
    database_name: myDatabase
    database_user: myLogin
    database_password: myDatabasePassword
    # ...
    dropbox_user: email@example.com
    dropbox_password: myDropboxPassword
	# ...

Usage

The bundle adds one command to symfony console: app/console dropbox_backup:database which you execute periodically as a cron job. For example the following cron command dumps your database every 3 hours on a machine with FreeBSD:

# /var/cron/tabs/root
0       */03    *       *       *       cd /path/to/symfony_project/root_dir && su -m symfony_user -c 'app/console dropbox_backup:database --env=prod'

At the moment the bundle only works with a single mysql database, but more database types can be added if there is a demand. In addition, the bundle can be extended to backup content. not only the database.

统计信息

  • 总下载量: 224
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2012-11-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固