2017 © Pedro Peláez
 

symfony-bundle backup-manager

A simple database backup manager for Symfony2 with support for S3, Rackspace, Dropbox, FTP, SFTP.

image

frcho/backup-manager

A simple database backup manager for Symfony2 with support for S3, Rackspace, Dropbox, FTP, SFTP.

  • Wednesday, February 7, 2018
  • by frcho
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1,771 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 6 % Grown

The README.md

FrchoBackupManagerBundle

A simple database backup manager for Symfony 4 with support for S3, Rackspace, Dropbox, FTP, SFTP., (*1)

This package pulls in the framework agnostic Backup Manager and provides seamless integration with Symfony., (*2)

for previous version of symfony use tag 1.0.1, (*3)

Installation

Step 1: Download the Bundle

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:, (*4)

$ composer require frcho/backup-manager "dev-master"

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation., (*5)

Step 2: Configure your databases and filesystems

# config/packages/frcho_backup_manager.yaml

frcho_backup_manager:
    database:
        development:
            type: mysql
            host: localhost
            port: 3306
            user: root
            pass: password
            database: test
        production:
            type: postgresql
            host: localhost
            port: 5432
            user: postgres
            pass: password
            database: test
    storage:
        local:
            type: Local
            root: /path/to/working/directory
        s3:
            type: AwsS3
            key:
            secret:
            region: us-east-1
            version: latest
            bucket:
            root:
        rackspace:
            type: Rackspace
            username:
            password:
            container:
        dropbox:
            type: Dropbox
            token:
            key:
            secret:
            app:
            root:
        ftp:
            type: Ftp
            host:
            username:
            password:
            root:
            port: 21
            passive: true
            ssl: true
            timeout: 30
        sftp:
            type: Sftp
            host:
            username:
            password:
            root:
            port: 21
            timeout: 10
            privateKey:

Usage

Backup to / restore from any configured database.

Backup the development database to Amazon S3. The S3 backup path will be test/backup.sql.gz in the end, when gzip is done with it., (*6)

$container->get('backup_manager')->makeBackup()->run('development', array(new Destination('s3', 'test/backup.sql.gz')), 'gzip');

Backup the development database to Local. The local backup path will be test/backup.sql.gz in the end, when gzip is done with it., (*7)

$container->get('backup_manager')->makeBackup()->run('development', array(new Destination('local', 'test/backup.sql.gz')), 'gzip');

Note: if you want upload files without compress pass like parameter a string 'null' instead of gzip, (*8)

Backup to / restore from any configured filesystem.

Restore the database file test/backup.sql.gz from Amazon S3 to the development database., (*9)

$this->container->get('backup_manager')->makeRestore()->run('s3', 'test/backup.sql.gz', 'development', 'gzip');

This package does not allow you to backup from one database type and restore to another. A MySQL dump is not compatible with PostgreSQL., (*10)

Requirements

  • PHP 7.0
  • MySQL support requires mysqldump and mysql command-line binaries
  • PostgreSQL support requires pg_dump and psql command-line binaries
  • Gzip support requires gzip and gunzip command-line binaries

The Versions

08/08 2017

1.0.1

1.0.1.0

A simple database backup manager for Symfony2 with support for S3, Rackspace, Dropbox, FTP, SFTP.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Luis Fernando Granados

database symfony s3 sftp backup ftp rackspace dropbox

17/08 2016