{"id":15063318,"url":"https://github.com/symandy/databasebackupbundle","last_synced_at":"2025-04-10T10:51:09.528Z","repository":{"id":57675697,"uuid":"475361455","full_name":"Symandy/DatabaseBackupBundle","owner":"Symandy","description":"A Symfony Bundle to manage database backup","archived":false,"fork":false,"pushed_at":"2025-03-09T16:02:03.000Z","size":118,"stargazers_count":5,"open_issues_count":4,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T09:46:44.478Z","etag":null,"topics":["database-management","mysql","php","symfony","symfony-bundle"],"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/Symandy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2022-03-29T09:00:42.000Z","updated_at":"2023-11-25T18:21:03.000Z","dependencies_parsed_at":"2025-02-17T02:33:50.708Z","dependency_job_id":null,"html_url":"https://github.com/Symandy/DatabaseBackupBundle","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Symandy%2FDatabaseBackupBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Symandy%2FDatabaseBackupBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Symandy%2FDatabaseBackupBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Symandy%2FDatabaseBackupBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Symandy","download_url":"https://codeload.github.com/Symandy/DatabaseBackupBundle/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248203317,"owners_count":21064563,"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":["database-management","mysql","php","symfony","symfony-bundle"],"created_at":"2024-09-24T23:54:54.636Z","updated_at":"2025-04-10T10:51:09.510Z","avatar_url":"https://github.com/Symandy.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DatabaseBackupBundle\n\nDatabaseBackupBundle is a Symfony Bundle to manage your databases backup.\n\n[![Build](https://github.com/Symandy/DatabaseBackupBundle/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/Symandy/DatabaseBackupBundle/actions/workflows/build.yml)\n\n## Installation\n\n```shell\ncomposer require symandy/database-backup-bundle\n```\n\nIf [Symfony Flex](https://github.com/symfony/flex) is not enabled yet for the bundle (A PR on\n[symfony/recipes-contrib](https://github.com/symfony/recipes-contrib) will be submitted soon), add the following lines\nto `config/bundles.php`.\n\n```php\n\u003c?php\n\nreturn [\n    ...\n    Symandy\\DatabaseBackupBundle\\SymandyDatabaseBackupBundle::class =\u003e ['all' =\u003e true],\n    ...\n];\n```\n\n## Configuration\n\n### YAML configuration\nAs in the previous part, if Symfony Flex is not enabled, add the following file (`symandy_database_backup.yaml`)\nto `config/packages` directory.\n\n#### Basic configuration\nIf the only purpose is to back up the database of the current project, use the basic configuration file.\n\n```yaml\nsymandy_database_backup:\n    backups:\n        app:\n            connection:\n                url: \"%env(DATABASE_URL)%\"\n            strategy:\n                max_files: 5\n                backup_directory: \"%kernel.project_dir%/backups\"\n```\n\n#### Advanced usages\n```yaml\nsymandy_database_backup:\n    backups:\n        foo:\n            connection:\n                # driver: !php/const \\Symandy\\DatabaseBackupBundle\\Model\\ConnectionDriver::MySQL\n                driver: mysql\n\n                # Usage of environment variables as parameters is recommended for connections configuration\n                configuration:\n                    user: \"%app.foo_db_user%\"\n                    password: \"%app.foo_db_password%\"\n                    host: 127.0.0.1 # Already the default value, don't need to be added\n                    port: 3306 # Already the default value, don't need to be added\n                    databases: [foo, bar, baz] # Will only back up these databases\n            strategy:\n                max_files: 5 # Number of files kept after a backup (per database)\n                # backup_directory: \"/var/www/backups\" # The directory must be created and must have the right permissions\n                backup_directory: \"%kernel.project_dir%/backups\"\n                # backup_directory: ~ # The current directory will be used if no value is passed\n                date_format: 'Y-m-d-His' # The date format to use in backup files (default: 'Y-m-d')\n\n        bar:\n            # Use Doctrine database url env parameter\n            connection:\n                url: \"%env(DATABASE_URL)%\" # url key will ALWAYS override array configuration\n                configuration:\n                    user: john # Overridden by url\n```\n\n### Drivers\n\nOnly the `mysql` driver is currently available.\n\n## Usage\nOnce the backups are configured, you only have to run the following command to generate the dumped databases backup files:\n\n```shell\nphp bin/console symandy:databases:backup\n```\n\nIt will generate one file by database in the format `\u003cbackup_name\u003e-\u003cdatabase\u003e-\u003cdate_format\u003e.sql`.\n\n\n## Changelog\n\nYou can see all the changes between versions here in the [CHANGELOG.md](CHANGELOG.md) or in the GitHub [releases page](https://github.com/Symandy/DatabaseBackupBundle/releases)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsymandy%2Fdatabasebackupbundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsymandy%2Fdatabasebackupbundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsymandy%2Fdatabasebackupbundle/lists"}