dev-master
9999999-dev http://github.com/kachkaev/KachkaevDropboxBackupBundleAllows backing up your mysql database to dropbox using symfony console
MIT
The Requires
by Contributors
database mysql dump dropbox
Wallogit.com
2017 © Pedro Peláez
Allows backing up your mysql database to dropbox using symfony console
This bundle allows you backing up your mysql database to dropbox using symfony console command., (*1)
Uses modified version of DropboxUploader by hakre., (*2)
IMPORTANT, (*3)
This repository is abandoned and has not been updated since 2013. Please enjoy these alternatives with a far greater functionality: * https://github.com/kbond/php-backup * https://github.com/dizda/CloudBackupBundle, (*4)
Add the following dependency to your project’s composer.json file:, (*5)
"require": {
// ...
"kachkaev/dropbox-backup-bundle": "dev-master"
// ...
}
Now tell composer to download the bundle by running the command:, (*6)
$ php composer.phar update kachkaev/dropbox-backup-bundle
Composer will install the bundle to vendor/kachkaev directory., (*7)
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new Kachkaev\DropboxBackupBundle\KachkaevDropboxBackupBundle(),
// ...
);
}
Here is the default configuration for the bundle:, (*8)
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.:, (*9)
# 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
# ...
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:, (*10)
# /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., (*11)
Allows backing up your mysql database to dropbox using symfony console
MIT
database mysql dump dropbox