{"id":13616931,"url":"https://github.com/backup-manager/symfony","last_synced_at":"2025-04-05T03:07:56.943Z","repository":{"id":44797549,"uuid":"42046295","full_name":"backup-manager/symfony","owner":"backup-manager","description":"Driver to seamlessly integrate the Backup Manager into Symfony applications.","archived":false,"fork":false,"pushed_at":"2022-01-24T06:38:35.000Z","size":99,"stargazers_count":120,"open_issues_count":6,"forks_count":40,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-29T02:05:51.951Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/backup-manager.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-07T10:16:54.000Z","updated_at":"2025-03-20T14:20:28.000Z","dependencies_parsed_at":"2022-09-19T05:10:46.813Z","dependency_job_id":null,"html_url":"https://github.com/backup-manager/symfony","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backup-manager%2Fsymfony","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backup-manager%2Fsymfony/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backup-manager%2Fsymfony/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backup-manager%2Fsymfony/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/backup-manager","download_url":"https://codeload.github.com/backup-manager/symfony/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247280264,"owners_count":20912967,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T20:01:34.922Z","updated_at":"2025-04-05T03:07:56.924Z","avatar_url":"https://github.com/backup-manager.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"BackupManagerBundle\n===================\n\n[![Latest Stable Version](https://poser.pugx.org/backup-manager/symfony/version.png)](https://packagist.org/packages/backup-manager/symfony)\n[![License](https://poser.pugx.org/backup-manager/symfony/license.png)](https://packagist.org/packages/backup-manager/symfony)\n[![Build Status](https://travis-ci.org/backup-manager/symfony.svg?branch=master)](https://travis-ci.org/backup-manager/symfony)\n[![Total Downloads](https://poser.pugx.org/backup-manager/symfony/downloads.png)](https://packagist.org/packages/backup-manager/symfony)\n\nA simple database backup manager for Symfony with support for S3, Rackspace, Dropbox, FTP, SFTP.\n\nThis package pulls in the framework agnostic [Backup Manager](https://github.com/backup-manager/backup-manager) and provides seamless integration with **Symfony**.\n\nInstallation\n============\n\nStep 1: Download the Bundle\n---------------------------\n\nOpen a command console, enter your project directory and execute the\nfollowing command to download the latest stable version of this bundle:\n\n```bash\n$ composer require backup-manager/symfony\n```\n\nThis command requires you to have Composer installed globally, as explained\nin the [installation chapter](https://getcomposer.org/doc/00-intro.md)\nof the Composer documentation.\n\nStep 2 (with Flex): Enable the Bundle\n-------------------------------------\n\nYou do not need to do anything more. The bundle is enabled automatically and\nyou have some nice default config in `config/packages/bm_backup_manager.yml`.\n\nStep 2 (no Flex): Enable the Bundle\n-----------------------------------\n\nIf you are not using Symfony Flex, you need to enable the bundle by adding it to\nthe list of registered bundles in the `app/AppKernel.php` file of your project.\n\n```php\n// config/bundles.php\n\nreturn [\n    BM\\BackupManagerBundle\\BMBackupManagerBundle::class =\u003e ['all' =\u003e true],\n    // ...\n];\n\n```\n\nStep 3: Configure your databases and filesystems\n------------------------------------------------\n\n```yaml\n# config/packages/bm_backup_manager.yml\n\nbm_backup_manager:\n    database:\n        development:\n            type: mysql\n            host: localhost\n            port: 3306\n            user: root\n            pass: password\n            database: test\n            ignoreTables: ['foo', 'bar']\n\n            # If DSN is specified, it will override other values\n            dsn: 'mysql://root:root_pass@127.0.0.1:3306/test_db'\n        production:\n            type: postgresql\n            host: localhost\n            port: 5432\n            user: postgres\n            pass: password\n            database: test\n\n            # You could also use a environment variable\n            dsn: '%env(resolve:DATABASE_URL)%'\n    storage:\n        local:\n            type: Local\n            root: /path/to/working/directory\n        s3:\n            type: AwsS3\n            key:\n            secret:\n            region: us-east-1\n            version: latest\n            bucket:\n            root:\n        b2:\n            type: B2\n            key:\n            accountId:\n            bucket:\n        rackspace:\n            type: Rackspace\n            username:\n            password:\n            container:\n        dropbox:\n            type: DropboxV2\n            token:\n            key:\n            secret:\n            app:\n            root:\n        ftp:\n            type: Ftp\n            host:\n            username:\n            password:\n            root:\n            port: 21\n            passive: true\n            ssl: true\n            timeout: 30\n        sftp:\n            type: Sftp\n            host:\n            username:\n            password:\n            root:\n            port: 21\n            timeout: 10\n            privateKey:\n```\n\nUsage\n=====\n\nTo backup from any configured database.\n-------------------------------------------------\n\nBackup 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.\n\n```php\nclass Foo {\n  private $backupManager;\n\n  public function __construct(BackupManager $backupManager) {\n      $this-\u003ebackupManager = $backupManager;\n  }\n\n  public function bar() {\n      $this-\u003ebackupManager-\u003emakeBackup()-\u003erun('development', [new Destination('s3', 'test/backup.sql')], 'gzip');\n  }\n}\n```\n\nOr with a command:\n\n```bash\nphp bin/console backup-manager:backup development s3 -c gzip --filename test/backup.sql\n```\n\nTo restore from any configured filesystem.\n---------------------------------------------------\n\nRestore the database file `test/backup.sql.gz` from `Amazon S3` to the `development` database.\n\n```php\nclass Foo {\n  private $backupManager;\n\n  public function __construct(BackupManager $backupManager) {\n      $this-\u003ebackupManager = $backupManager;\n  }\n\n  public function bar() {\n      $this-\u003ebackupManager-\u003emakeRestore()-\u003erun('s3', 'test/backup.sql.gz', 'development', 'gzip');\n  }\n}\n```\n\nOr with a command:\n\n```bash\nphp bin/console backup-manager:restore development s3 test/backup.sql.gz -c gzip\n```\n\n\u003e This package does not allow you to backup from one database type and restore to another. A MySQL dump is not compatible with PostgreSQL.\n\nRequirements\n============\n\n- PHP 7.3\n- MySQL support requires `mysqldump` and `mysql` command-line binaries\n- PostgreSQL support requires `pg_dump` and `psql` command-line binaries\n- Gzip support requires `gzip` and `gunzip` command-line binaries\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbackup-manager%2Fsymfony","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbackup-manager%2Fsymfony","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbackup-manager%2Fsymfony/lists"}