Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Cronos Database Dumper Laravel Package

cdwv/cronos-database-dumper

View on GitHub
Deep Wiki
Context7

Description

This bundle populates your crontab with tasks that will backup your databases using mysqldump.

Requirements

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

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

Installation

run:

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

add bundle to AppKernel:

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

Run:

    cdwv:cronos-database-dumper:update

Configuration:

in config.yml, defaults values:

    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:

# 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.

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).

License

The MIT License © 2015 - 2016

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
besmartand-pro/php-quality-config
sentix/ai-chatbot
codifyo/ts-generator-bundle
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor