2017 © Pedro Peláez
 

symfony-bundle cronos-database-dumper

Cronos database dumper

image

cdwv/cronos-database-dumper

Cronos database dumper

  • Thursday, June 22, 2017
  • by karol.grochowalski@gmail.com
  • Repository
  • 6 Watchers
  • 4 Stars
  • 161 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

Description

This bundle populates your crontab with tasks that will backup your databases using mysqldump., (*1)

Requirements

Backups are created using the mysqldump command which means you need to have at least mysql-client package installed on your server., (*2)

sudo apt-get update
sudo apt-get install mysql-client

Installation

run:, (*3)

composer require cdwv/mysql-dumper-command-bundle
composer require cdwv/cronos-database-dumper

add bundle to AppKernel:, (*4)

new CodeWave\CronosDatabaseDumperBundle\CodeWaveCronosDatabaseDumperBundle(),
new CodeWave\MysqlDumperCommandBundle\CodeWaveMysqlDumperCommandBundle()

Run:

    cdwv:cronos-database-dumper:update

Configuration:

in config.yml, defaults values:, (*5)

    code_wave_cronos_database_dumper:
            minute: 4
            hour: 0
            dumps_location: .
            key: app_name
            php_path: /usr/bin/php
            env: prod 
            clean_older_than: 14 #days

Crontab:

The above configuration will result in the following entry in your crontab:, (*6)

# KEY app_name
0    4    *    *    *    /usr/bin/php __PATH_TO_YOUR_PROJECT__/app/console cdwv:database:dump --env=prod --path=.

0    4    *    *    *    find * -mtime +14 -exec rm {} \;
# END

This task will dump all of the databases from within your symfony project if there are connections defined for them., (*7)

Bear in mind that __PATH_TO_YOUR_PROJECT__ will contain resolved symlinks which means that you might need to call cdwv:cronos-database-dumper:update each time the path to new version of the app will change (e.g. if you have releases named by build number)., (*8)

License

The MIT License © 2015 - 2016, (*9)

The Versions

22/06 2017

dev-master

9999999-dev

Cronos database dumper

  Sources   Download

MIT

The Requires

 

by Karol Grochowalski

cron cronos dump dumper database bundle

22/06 2017

1.3

1.3.0.0

Cronos database dumper

  Sources   Download

MIT

The Requires

 

by Karol Grochowalski

cron cronos dump dumper database bundle

22/02 2017

1.2.1

1.2.1.0

Cronos database dumper

  Sources   Download

The Requires

 

by Karol Grochowalski

cron cronos dump dumper database bundle

21/02 2017

1.2

1.2.0.0

Cronos database dumper

  Sources   Download

The Requires

 

by Karol Grochowalski

cron cronos dump dumper database bundle

21/02 2017

1.1

1.1.0.0

Cronos database dumper

  Sources   Download

The Requires

 

by Karol Grochowalski

cron cronos dump dumper database bundle

21/02 2017

1

1.0.0.0

Cronos database dumper

  Sources   Download

The Requires

 

by Karol Grochowalski

cron cronos dump dumper database bundle