{"id":21400248,"url":"https://github.com/oefenweb/ansible-mydumper-backup","last_synced_at":"2025-07-13T21:31:11.808Z","repository":{"id":31853926,"uuid":"35421213","full_name":"Oefenweb/ansible-mydumper-backup","owner":"Oefenweb","description":"Ansible role to perform backups using mydumper","archived":false,"fork":false,"pushed_at":"2024-03-11T10:20:47.000Z","size":114,"stargazers_count":4,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-03-11T11:36:17.435Z","etag":null,"topics":["ansible","backup","backup-database","database","debian","mydumper","myloader","mysql","restore","ubuntu"],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/Oefenweb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2015-05-11T12:00:49.000Z","updated_at":"2023-03-17T14:36:30.000Z","dependencies_parsed_at":"2024-03-11T11:46:18.269Z","dependency_job_id":null,"html_url":"https://github.com/Oefenweb/ansible-mydumper-backup","commit_stats":null,"previous_names":[],"tags_count":57,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oefenweb%2Fansible-mydumper-backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oefenweb%2Fansible-mydumper-backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oefenweb%2Fansible-mydumper-backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oefenweb%2Fansible-mydumper-backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Oefenweb","download_url":"https://codeload.github.com/Oefenweb/ansible-mydumper-backup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225917617,"owners_count":17544926,"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":["ansible","backup","backup-database","database","debian","mydumper","myloader","mysql","restore","ubuntu"],"created_at":"2024-11-22T15:20:08.843Z","updated_at":"2024-11-22T15:20:09.553Z","avatar_url":"https://github.com/Oefenweb.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"## mydumper-backup\n\n[![CI](https://github.com/Oefenweb/ansible-mydumper-backup/workflows/CI/badge.svg)](https://github.com/Oefenweb/ansible-mydumper-backup/actions?query=workflow%3ACI)\n[![Ansible Galaxy](http://img.shields.io/badge/ansible--galaxy-mydumper--backup-blue.svg)](https://galaxy.ansible.com/Oefenweb/mydumper_backup)\n\nPerform backups using [mydumper](https://launchpad.net/mydumper).\n\n#### Requirements\n\n* `mydumper` (will not be installed)\n\n#### Variables\n\n* `mydumper_backup_install_path`: [default: `/usr/local/bin`]: Install directory\n* `mydumper_backup_mydumper_path`: [default: `/usr/local/bin`]: Path to `mydumper`\n* `mydumper_backup_myloader_path`: [default: `mydumper_backup_mydumper_path`]: Path to `myloader`\n\n* `mydumper_backup_all`: [optional, default: `false`]: Whether or not to backup all databases. When true, disables databases options\n* `mydumper_backup_all_regex`: [optional]: A regular expression to match against database and table (only when `mydumper_backup_all` is true)\n\n* `mydumper_backup_backup_databases`: [default: `[]`]: Backup declarations\n* `mydumper_backup_backup_databases.{n}.src`: [required]: Database name (from)\n* `mydumper_backup_backup_databases.{n}.dest`: [optional, default `src`]: Directory name (to)\n\n* `mydumper_backup_restore_all`: [optional, default: `mydumper_backup_all`]: Whether or not to restore all databases. When true, disables databases options\n* `mydumper_backup_restore_databases`: [default: `mydumper_backup_backup_databases`]: Restore declarations\n* `mydumper_backup_restore_databases.{n}.src`: [required]: Database name (to)\n* `mydumper_backup_restore_databases.{n}.dest`: [optional, default `src`]: Directory name (from)\n* `mydumper_backup_restore_databases.{n}.overwrite_tables`: [optional, default `mydumper_backup_overwrite_tables`]: Drop any existing tables when restoring schemas\n\n* `mydumper_backup_backup_path`: [default: `/tmp`]: Directory to backup to\n* `mydumper_backup_restore_path`: [default: `mydumper_backup_backup_path`]: Directory to restore from\n\n* `mydumper_backup_backup_threads`: [optional, default: `4`]: Number of threads to use for backup (e.g. `\"{{ (ansible_processor_vcpus / 2) | round(0, 'ceil') }}\"`)\n* `mydumper_backup_restore_threads`: [optional, default: `mydumper_backup_backup_threads`]: Number of threads to use for restore\n\n* `mydumper_backup_host`: [optional, default `localhost`]: The host to connect to\n* `mydumper_backup_user`: [optional]: User with privileges to run the dump\n* `mydumper_backup_password`: [optional]: User password\n\n* `mydumper_backup_verbose`: [optional, default: `2`]: The verbosity of messages (e.g. `0 = silent`, `1 = errors`, `2 = warnings`, `3 = info`)\n* `mydumper_backup_compress`: [optional, default: `false`]: Compress output files\n* `mydumper_backup_build_empty_files`: [optional, default: `false`]: Build dump files even if no data available from table\n* `mydumper_backup_triggers`: [optional, default: `false`]: Whether or not to dump triggers\n* `mydumper_backup_overwrite_tables`: [optional, default: `false`]: Drop any existing tables when restoring schemas\n* `mydumper_backup_enable_binlog`: [optional, default: `false`]: Log the data loading in the MySQL binary log if enabled\n\n## Dependencies\n\nNone\n\n## Recommended\n\n* `ansible-mydumper` ([see](https://github.com/Oefenweb/ansible-mydumper))\n\n#### Example(s)\n\n##### Simple (all)\n\n* Backup all databases\n* Restore all databases\n\n```yaml\n---\n- hosts: all\n  roles:\n    - oefenweb.mydumper-backup\n  vars:\n    mydumper_backup_all: true\n    mydumper_backup_overwrite_tables: true\n```\n\n##### Simple (all with ignore)\n\n* Backup all databases ignore `sakila`\n* Restore all databases\n\n```yaml\n---\n- hosts: all\n  roles:\n    - oefenweb.mydumper-backup\n  vars:\n    mydumper_backup_all: true\n    mydumper_backup_all_regex: '^(?!(sakila\\.))'\n```\n\n##### Simple (same src and dest)\n\n* Backup database `sakila` to directory `sakila`\n* Restore database `sakila` from directory `sakila`\n\n```yaml\n---\n- hosts: all\n  roles:\n    - oefenweb.mydumper-backup\n  vars:\n    mydumper_backup_backup_databases:\n      - src: sakila\n    mydumper_backup_overwrite_tables: true\n```\n\n##### Simple (different src and dest)\n\n* Backup database `sakila` to directory `alikas`\n* Restore database `sakila` from directory `alikas`\n\n```yaml\n---\n- hosts: all\n  roles:\n    - oefenweb.mydumper-backup\n  vars:\n    mydumper_backup_backup_databases:\n      - src: sakila\n        dest: alikas\n    mydumper_backup_overwrite_tables: true\n```\n\n##### Advance (different configuration for backup and restore and different src and dest)\n\n* Backup database `a` to directory `b`\n* Restore database `c` from directory `d`\n\n```yaml\n---\n- hosts: all\n  roles:\n    - oefenweb.mydumper-backup\n  vars:\n    mydumper_backup_backup_databases:\n      - src: a\n        dest: b\n    mydumper_backup_restore_databases:\n      - src: c\n        dest: d\n    mydumper_backup_overwrite_tables: true\n```\n\n#### License\n\nMIT\n\n#### Author Information\n\nMischa ter Smitten\n\n#### Feedback, bug-reports, requests, ...\n\nAre [welcome](https://github.com/Oefenweb/ansible-mydumper-backup/issues)!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foefenweb%2Fansible-mydumper-backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foefenweb%2Fansible-mydumper-backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foefenweb%2Fansible-mydumper-backup/lists"}