{"id":13409423,"url":"https://github.com/backup-manager/backup-manager","last_synced_at":"2025-05-13T22:11:26.680Z","repository":{"id":15633544,"uuid":"18370443","full_name":"backup-manager/backup-manager","owner":"backup-manager","description":"Database backup manager for dumping to and restoring databases from S3, Dropbox, FTP, SFTP, and Rackspace Cloud","archived":false,"fork":false,"pushed_at":"2024-09-08T11:36:28.000Z","size":615,"stargazers_count":1682,"open_issues_count":15,"forks_count":220,"subscribers_count":54,"default_branch":"master","last_synced_at":"2025-04-30T15:18:44.198Z","etag":null,"topics":["backup","backup-manager","cloud","database","framework-agnostic","laravel","mysql","php","postgresql","restore","symfony"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/backup-manager.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-04-02T15:04:42.000Z","updated_at":"2025-04-25T12:00:58.000Z","dependencies_parsed_at":"2023-11-21T00:12:38.358Z","dependency_job_id":"22df9ced-6dd3-48df-9ee5-2e16f121a857","html_url":"https://github.com/backup-manager/backup-manager","commit_stats":{"total_commits":441,"total_committers":45,"mean_commits":9.8,"dds":0.4217687074829932,"last_synced_commit":"999deae117264564fe255803631d19a59f822f16"},"previous_names":[],"tags_count":46,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backup-manager%2Fbackup-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backup-manager%2Fbackup-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backup-manager%2Fbackup-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backup-manager%2Fbackup-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/backup-manager","download_url":"https://codeload.github.com/backup-manager/backup-manager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254036842,"owners_count":22003654,"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":["backup","backup-manager","cloud","database","framework-agnostic","laravel","mysql","php","postgresql","restore","symfony"],"created_at":"2024-07-30T20:01:00.672Z","updated_at":"2025-05-13T22:11:26.635Z","avatar_url":"https://github.com/backup-manager.png","language":"PHP","readme":"# Database Backup Manager\n\n![Packagist Version](https://img.shields.io/packagist/v/backup-manager/backup-manager)\n![Packagist License](https://img.shields.io/packagist/l/backup-manager/backup-manager)\n![Installs](https://img.shields.io/packagist/dt/backup-manager/backup-manager)\n\nThis package provides a framework-agnostic database backup manager for dumping to and restoring databases from S3, Dropbox, FTP, SFTP, and Rackspace Cloud.\n\n- use version 2+ for \u0026gt;=PHP 7.3\n- use version 1 for \u0026lt;PHP 7.2\n\n[Watch a video tour](https://www.youtube.com/watch?v=vWXy0R8OavM) showing the Laravel driver in action to give you an idea what is possible.\n\n- supports `MySQL` and `PostgreSQL`\n- compress with `Gzip`\n- framework-agnostic\n- dead simple configuration\n- [Laravel Driver](http://github.com/backup-manager/laravel)\n- [Symfony Driver](http://github.com/backup-manager/symfony)\n\n### Table of Contents\n\n- [Database Backup Manager](#database-backup-manager)\n    - [Table of Contents](#table-of-contents)\n    - [Quick and Dirty](#quick-and-dirty)\n    - [Requirements](#requirements)\n    - [Installation](#installation)\n    - [Usage](#usage)\n    - [Contribution Guidelines](#contribution-guidelines)\n    - [Maintainers](#maintainers)\n    - [Backwards Compatibility Breaks](#backwards-compatibility-breaks)\n    - [License](#license)\n\n### Quick and Dirty\n\n**Configure your databases.**\n\n```php\n// config/database.php\n'development' =\u003e [\n    'type' =\u003e 'mysql',\n    'host' =\u003e 'localhost',\n    'port' =\u003e '3306',\n    'user' =\u003e 'root',\n    'pass' =\u003e 'password',\n    'database' =\u003e 'test',\n    // If singleTransaction is set to true, the --single-transcation flag will be set.\n    // This is useful on transactional databases like InnoDB.\n    // http://dev.mysql.com/doc/refman/5.7/en/mysqldump.html#option_mysqldump_single-transaction\n    'singleTransaction' =\u003e false,\n    // Do not dump the given tables\n    // Set only table names, without database name\n    // Example: ['table1', 'table2']\n    // http://dev.mysql.com/doc/refman/5.7/en/mysqldump.html#option_mysqldump_ignore-table\n    'ignoreTables' =\u003e [],\n    // using ssl to connect to your database - active ssl-support (mysql only):\n    'ssl'=\u003efalse,\n    // add additional options to dump-command (like '--max-allowed-packet')\n    'extraParams'=\u003enull,\n],\n'production' =\u003e [\n    'type' =\u003e 'postgresql',\n    'host' =\u003e 'localhost',\n    'port' =\u003e '5432',\n    'user' =\u003e 'postgres',\n    'pass' =\u003e 'password',\n    'database' =\u003e 'test',\n],\n```\n\n**Configure your filesystems.**\n\n```php\n// config/storage.php\n'local' =\u003e [\n    'type' =\u003e 'Local',\n    'root' =\u003e '/path/to/working/directory',\n],\n's3' =\u003e [\n    'type' =\u003e 'AwsS3',\n    'key'    =\u003e '',\n    'secret' =\u003e '',\n    'region' =\u003e 'us-east-1',\n    'version' =\u003e 'latest',\n    'bucket' =\u003e '',\n    'root'   =\u003e '',\n    'use_path_style_endpoint' =\u003e false,\n],\n'b2' =\u003e [\n    'type' =\u003e 'B2',\n    'key'    =\u003e '',\n    'accountId' =\u003e '',\n    'bucket' =\u003e '',\n],\n'gcs' =\u003e [\n    'type' =\u003e 'Gcs',\n    'key'    =\u003e '',\n    'secret' =\u003e '',\n    'version' =\u003e 'latest',\n    'bucket' =\u003e '',\n    'root'   =\u003e '',\n],\n'rackspace' =\u003e [\n    'type' =\u003e 'Rackspace',\n    'username' =\u003e '',\n    'key' =\u003e '',\n    'container' =\u003e '',\n    'zone' =\u003e '',\n    'root' =\u003e '',\n],\n'dropbox' =\u003e [\n    'type' =\u003e 'DropboxV2',\n    'token' =\u003e '',\n    'key' =\u003e '',\n    'secret' =\u003e '',\n    'app' =\u003e '',\n    'root' =\u003e '',\n],\n'ftp' =\u003e [\n    'type' =\u003e 'Ftp',\n    'host' =\u003e '',\n    'username' =\u003e '',\n    'password' =\u003e '',\n    'root' =\u003e '',\n    'port' =\u003e 21,\n    'passive' =\u003e true,\n    'ssl' =\u003e true,\n    'timeout' =\u003e 30,\n],\n'sftp' =\u003e [\n    'type' =\u003e 'Sftp',\n    'host' =\u003e '',\n    'username' =\u003e '',\n    'password' =\u003e '',\n    'root' =\u003e '',\n    'port' =\u003e 21,\n    'timeout' =\u003e 10,\n    'privateKey' =\u003e '',\n],\n'flysystem' =\u003e [\n    'type' =\u003e 'Flysystem',\n    'name' =\u003e 's3_backup',\n    //'prefix' =\u003e 'upload',\n],\n'doSpaces' =\u003e [\n    'type' =\u003e 'AwsS3',\n    'key' =\u003e '',\n    'secret' =\u003e '',\n    'region' =\u003e '',\n    'bucket' =\u003e '',\n    'root' =\u003e '',\n    'endpoint' =\u003e '',\n    'use_path_style_endpoint' =\u003e false,\n],\n'webdav' =\u003e [\n    'type' =\u003e 'Webdav',\n    'baseUri' =\u003e 'http://myserver.com',\n    'userName' =\u003e '',\n    'password' =\u003e '',\n    'prefix' =\u003e '',\n],\n```\n\n**Backup to / restore from any configured database.**\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\nuse BackupManager\\Filesystems\\Destination;\n\n$manager = require 'bootstrap.php';\n$manager-\u003emakeBackup()-\u003erun('development', [new Destination('s3', 'test/backup.sql')], 'gzip');\n```\n\n**Backup to / restore from any configured filesystem.**\n\nRestore the database file `test/backup.sql.gz` from `Amazon S3` to the `development` database.\n\n```php\n$manager = require 'bootstrap.php';\n$manager-\u003emakeRestore()-\u003erun('s3', 'test/backup.sql.gz', 'development', '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\n### Requirements\n\n- PHP 5.5\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\n\n### Installation\n\n**Composer**\n\nRun the following to include this via Composer\n\n```shell\ncomposer require backup-manager/backup-manager\n```\n\nThen, you'll need to select the appropriate packages for the adapters that you want to use.\n\n```shell\n# to support s3\ncomposer require league/flysystem-aws-s3-v3\n\n# to support b2\ncomposer require mhetreramesh/flysystem-backblaze\n\n# to support google cs\ncomposer require league/flysystem-aws-s3-v2\n\n# to install the preferred dropbox v2 driver\ncomposer required spatie/flysystem-dropbox\n\n# to install legacy dropbox v2 driver\ncomposer require srmklive/flysystem-dropbox-v2\n\n# to support rackspace\ncomposer require league/flysystem-rackspace\n\n# to support sftp\ncomposer require league/flysystem-sftp\n\n# to support webdav (supported by owncloud nad many other)\ncomposer require league/flysystem-webdav\n```\n\n### Usage\n\nOnce installed, the package must be bootstrapped (initial configuration) before it can be used.\n\nWe've provided a native PHP example [here](https://github.com/backup-manager/backup-manager/tree/master/examples).\n\nThe required bootstrapping can [be found in the example here](https://github.com/backup-manager/backup-manager/blob/master/examples/standalone/bootstrap.php).\n\n\n### Contribution Guidelines\n\nWe recommend using the vagrant configuration supplied with this package for development and contribution. Simply install VirtualBox, Vagrant, and Ansible then run `vagrant up` in the root folder. A virtualmachine specifically designed for development of the package will be built and launched for you.\n\nWhen contributing please consider the following guidelines:\n\n- Code style is PSR-2\n    - Interfaces should NOT be suffixed with `Interface`, Traits should NOT be suffixed with `Trait`.\n- All methods and classes must contain docblocks.\n- Ensure that you submit tests that have minimal 100% coverage. Given the project's simplicity it just makes sense.\n- When planning a pull-request to add new functionality, it may be wise to [submit a proposal](https://github.com/backup-manager/backup-manager/issues/new) to ensure compatibility with the project's goals.\n\n### Maintainers\n\nThis package is maintained by [Shawn McCool](http://shawnmc.cool) and you!\n\n### Backwards Compatibility Breaks\n\n#### 3.0\n\nRemove support for symfony 2. Specifically symfony/process versions \u003c 3.x\n\n### License\n\nThis package is licensed under the [MIT license](https://github.com/backup-manager/backup-manager/blob/master/LICENSE). Go wild.\n","funding_links":[],"categories":["PHP"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbackup-manager%2Fbackup-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbackup-manager%2Fbackup-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbackup-manager%2Fbackup-manager/lists"}