Giter Club home page Giter Club logo

gorgo-database-snapshot-bundle's Introduction

Oro Database Snapshot Bundle

Limitations

  • Database user should have rights for DROP & CREATE DATABASE
  • PHP environment should allow to use "putenv" function

Installation

If you are using it within Oro Application, you should follow next manual

    composer require gorgo13/database-snapshot-bundle
    php app/console cache:clear

If you are using it not with Oro Products then you additionally must register bundle at AppKernel

class AppKernel extends AcmeKernel
{
    public function registerBundles()
    {
        $bundles = array(
            .....
            new \Oro\Bundle\DatabaseSnapshotBundle\OroDatabaseSnapshotBundle(),
        );

        return $bundles;
    }

    public function registerContainerConfiguration(LoaderInterface $loader)
    {
        $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
    }
}

Configuration

If you have custom paths for database engine binaries then you can override them at config

oro_database_snapshot:
    mysql:
        mysql: {PATH_TO_MYSQL_BINARY} # default "mysql"
        mysqldump: {PATH_TO_MYSQLDUMP_BINARY} # default "mysqldump"
    postgresql:
        dropdb: {PATH_TO_DROPDB_BINARY} # default "dropdb"
        createdb: {PATH_TO_CREATEDB_BINARY} # default "createdb"
        psql: {PATH_TO_PSQL_BINARY} #default "psql"

CLI Commands

If your application have "Doctrine Bundle" then you able to use following commands

  • doctrine:connections - displays the list of all registered connections within application
  • oro:database:snapshot:dump - creates database snapshot for given connection with optional suffix
    • connection is connection name to be dumped (OPTIONAL, Default: null)
    • id is suffix for dump name (be used for restore command) (OPTIONAL, Default: current date)
  • oro:database:snapshot:restore - restores database snapshot for given connection with optional suffix
    • connection is connection name to be dumped (OPTIONAL, Default: null)
    • id is suffix for dump name (be used for restore command) (OPTIONAL, Default: current date)

gorgo-database-snapshot-bundle's People

Contributors

inri13666 avatar

Watchers

James Cloos avatar Ivan Shirko avatar Uladzimir Tsykun avatar

Forkers

vtsykun

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.