mdespeuilles/backupmigratebundle

This package is abandoned and no longer maintained. No replacement package was suggested.

Backup Restore Bundle

1.3.1 2018-04-03 09:13 UTC

This package is not auto-updated.

Last update: 2023-11-26 19:10:53 UTC


README

This bundle provide a command to backup and Restore files and database for your Symfony application.

Installation

To install BackupMigrateBundle with Composer just type in your terminal:

php composer.phar require mdespeuilles/backupmigrateBundle

Now update your AppKernel.php file, and register the new bundle:

<?php

// in AppKernel::registerBundles()
$bundles = array(
    // ...
    new Mdespeuilles\BackupMigrateBundle\MdespeuillesBackupMigrateBundleBundle(),
    // ...
);

Configuration

Configure the bundle in your config.yml

mdespeuilles_backup_migrate:
    # Destination path for backup
    destination_path: "%kernel.root_dir%/../private"
    
    #files folders to backup
    files_folder:
        uploads:
            path: "%kernel.root_dir%/../web/uploads"
        medias:
            path: "%kernel.root_dir%/../web/medias"
        ....
            

Usage

Backup

Run this command to start a backup :

php bin/console bm:backup

if you want to backup only database :

php bin/console bm:backup --database-only

if you want to backup only files :

php bin/console bm:backup --files-only

Restore

Run this command to start a restore :

php bin/console bm:restore

if you want to restore only database :

php bin/console bm:restore --database-only

if you want to restore only files :

php bin/console bm:restore --files-only