{"id":40405917,"url":"https://github.com/bastantoine/backup-me","last_synced_at":"2026-01-20T13:39:20.793Z","repository":{"id":245290634,"uuid":"817816598","full_name":"bastantoine/backup-me","owner":"bastantoine","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-25T22:05:47.000Z","size":66,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-25T23:16:34.738Z","etag":null,"topics":["backup","backup-tool","backup-tools","backups"],"latest_commit_sha":null,"homepage":"","language":"Python","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/bastantoine.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":"2024-06-20T13:54:28.000Z","updated_at":"2024-12-25T22:05:51.000Z","dependencies_parsed_at":"2024-06-21T06:14:44.572Z","dependency_job_id":"c35437d6-9e90-4d94-ada8-498d1eab7811","html_url":"https://github.com/bastantoine/backup-me","commit_stats":null,"previous_names":["bastantoine/backup-me"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bastantoine/backup-me","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bastantoine%2Fbackup-me","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bastantoine%2Fbackup-me/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bastantoine%2Fbackup-me/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bastantoine%2Fbackup-me/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bastantoine","download_url":"https://codeload.github.com/bastantoine/backup-me/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bastantoine%2Fbackup-me/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28603901,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T12:01:53.233Z","status":"ssl_error","status_checked_at":"2026-01-20T12:01:46.545Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-tool","backup-tools","backups"],"created_at":"2026-01-20T13:39:20.696Z","updated_at":"2026-01-20T13:39:20.777Z","avatar_url":"https://github.com/bastantoine.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Backup me\n\nThis tool is designed for backups. It allows backing up various databases and files to S3 compatible storages.\n\nIt is designed to be run as a Docker container.\n\n\u003e [!IMPORTANT]\n\u003e This tool is definitively **NOT production ready**, and will certainly never be. You shouldn't use it in a production critical environment. I know my way around databases and devops tools, but I don't claim to be a database backup expert.\n\u003e\n\u003e I have built this tool more as a hobby (yes I know, weird hobby...) and for a personal use cases. If you'd like to use, I'd be more than happy to help you.\n\u003e\n\u003e Please use more production ready and complete tools if you have real and serious use cases.\n\n## Installation\n\nDocker images are build for version and published on the GitHub container registry.\n\nThe available versions can be browsed in the [*Packages* of the repo](https://github.com/bastantoine/backup-me/pkgs/container/backup-me).\n\n```shell\ndocker run ghcr.io/bastantoine/backup-me:latest\n```\n\n## Configuration\n\nThe tool can be configured with a `config.json` file, with the following structure:\n\n```json\n{\n    \"app\": \"\u003cAPP NAME\u003e\",\n    \"sources\": [\n        [...]\n    ],\n    \"destinations\": [\n        [...]\n    ]\n}\n```\n\n- `app`: the name of the application currently being handled. This will be used in the name of the backups.\n- `sources` is a list of one or more sources that needs to be backed up. The available sources are listed below.\n- `destinations` is a list of one or more destination where to send the backups once they have been generated. The available destinations are listed below.\n\nSome parameters can be configured from env var. They are marked as `sensitive` below.\n\nThe environment variables should be named `\u003csource/destination type\u003e_\u003cname\u003e_\u003cparam name\u003e` where:\n- `\u003csource/destination type\u003e` is the uppercased value of the `type` field of the source/destination being configured. See below the list of allowed values. being the name of the destination uppercased, and with spaces replaced by underscores.\n- `\u003cname\u003e` is the uppercased value of the `name` field of the source/destination being configured, with spaces replaced by underscores.\n- `\u003cparam name\u003e` is the uppercased value of the parameter being configured.\n\nIf a param is provided both in the config file and in the environement, the value of the config file will have precedence.\n\n### Available sources\n\n#### MySQL\n\n```json\n{\n    \"type\": \"mysql\",\n    \"name\": \"mysql_db\",\n    \"backup_filename\": \"mysql_backup\",\n    \"host\": \"localhost\",\n    \"port\": \"3306\",\n    \"username\": \"username\",\n    \"password\": \"password\",\n    \"database\": \"--all-databases\",\n    \"all_databases\": true,\n    \"mysql_dump_bin\": \"/usr/local/opt/mysql-client/bin/mysqldump\"\n}\n```\n\n| Key               | Description                                           | Required | Default value                                 | Sensitive |\n| ----------------- | ----------------------------------------------------- | -------- | --------------------------------------------- | --------- |\n| `type`            | Type of source                                        | Yes      | `\"mysql\"`                                     | No        |\n| `name`            | Name of source                                        | Yes      |                                               | No        |\n| `backup_filename` | Name of the backup file generated                     | Yes      |                                               | No        |\n| `host`            | Hostname of the MySQL server                          | Yes      |                                               | No        |\n| `port`            | Port to connect to the server                         | No       | 3306                                          | No        |\n| `username`        | Username to connect to the server                     | Yes      |                                               | Yes       |\n| `password`        | Password to connect to the server                     | Yes      |                                               | Yes       |\n| `database`        | Name of the database to backup                        | No*      |                                               | No        |\n| `all_databases`   | Whether to backup all databases of the server         | No*      | False                                         | No        |\n| `mysql_dump_bin`  | Path to the `mysql_dump_bin` tool used for the backup | No       | `\"/usr/local/opt/mysql-client/bin/mysqldump\"` | No        |\n\n\u003e [!TIP]\n\u003e The `database` and `all_databases` parameters are mutually exclusive. One of them must be provided at all time. Config validation will fail if none are provided. If both are provided at the same time `all_databases` will have precedence.\n\n#### PostgreSQL\n\n```json\n{\n    \"type\": \"postgres\",\n    \"name\": \"pg_db\",\n    \"backup_filename\": \"pg_backup\",\n    \"host\": \"0.0.0.0\",\n    \"port\": \"5432\",\n    \"username\": \"username\",\n    \"password\": \"password\",\n    \"database\": \"db\",\n    \"all_databases\": true,\n    \"pg_dump_bin\": \"/usr/local/opt/libpq/bin/pg_dump\",\n    \"pg_dumpall_bin\": \"/usr/local/opt/libpq/bin/pg_dumpall\"\n}\n```\n\n| Key               | Description                                           | Required | Default value                           | Sensitive |\n| ----------------- | ----------------------------------------------------- | -------- | --------------------------------------- | --------- |\n| `type`            | Type of source                                        | Yes      | `\"postgres\"`                            | No        |\n| `name`            | Name of source                                        | Yes      |                                         | No        |\n| `backup_filename` | Name of the backup file generated                     | Yes      |                                         | No        |\n| `host`            | Hostname of the PostgreSQL server                     | Yes      |                                         | No        |\n| `port`            | Port to connect to the server                         | No       | 5432                                    | No        |\n| `username`        | Username to connect to the server                     | Yes      |                                         | Yes       |\n| `password`        | Password to connect to the server                     | Yes      |                                         | Yes       |\n| `database`        | Name of the database to backup                        | No*      |                                         | No        |\n| `all_databases`   | Whether to backup all databases of the server         | No*      | False                                   | No        |\n| `pg_dump_bin`     | Path to the `pg_dump_bin` tool used for the backup    | No       | `\"/usr/local/opt/libpq/bin/pg_dump\"`    | No        |\n| `pg_dumpall_bin`  | Path to the `pg_dumpall_bin` tool used for the backup | No       | `\"/usr/local/opt/libpq/bin/pg_dumpall\"` | No        |\n\n\u003e [!TIP]\n\u003e The `database` and `all_databases` parameters are mutually exclusive. One of them must be provided at all time. Config validation will fail if none are provided. If both are provided at the same time `all_databases` will have precedence.\n\n\u003e [!TIP]\n\u003e The `pg_dump_bin` is used when backing up only one database (ie. when the `database` param is provided). When backing up the entire cluster, `pg_dumpall_bin` is used (ie. when the `all_databases` param is provided).\n\n#### Raw files\n\n```json\n{\n    \"type\": \"files\",\n    \"name\": \"files\",\n    \"backup_filename\": \"config\",\n    \"archive_type\": \"tar\",\n    \"files\": [\n        \"~/.vimrc\",\n        \"~/.sqliterc\",\n        \"~/.zshrc\"\n    ]\n}\n```\n\n| Key               | Description                                      | Required | Default value |\n| ----------------- | ------------------------------------------------ | -------- | ------------- |\n| `type`            | Type of source                                   | Yes      | `\"files\"`     |\n| `name`            | Name of source                                   | Yes      |               |\n| `backup_filename` | Name of the backup file generated                | Yes      |               |\n| `files`           | List of paths to files to back up in the archive | Yes      |               |\n| `archive_type`    | Type of archive to create (`zip` or `tar`)       | No       | `\"tar\"`       |\n\n\u003e [!TIP]\n\u003e The paths in `files` can either be absolute, relative to the current user homedir, or relative the current working directory.\n\n#### HTTP call\n\n```json\n{\n    \"type\": \"http\",\n    \"name\": \"http\",\n    \"url\": \"https://httpbin.org/json\",\n    \"method\": \"GET\",\n    \"request_params\": {\n        \"headers\": {\n            \"Authorization\": \"Bearer THIS_IS_A_TOKEN\"\n        }\n    }\n}\n```\n\n| Key               | Description                                      | Required | Default value |\n| ----------------- | ------------------------------------------------ | -------- | ------------- |\n| `type`            | Type of source                                   | Yes      | `\"http\"`      |\n| `name`            | Name of source                                   | Yes      |               |\n| `url`             | URL to call                                      | Yes      |               |\n| `method`          | HTTP method to use to do the API call            | Yes      |               |\n| `request_params`  | Any extra param required for the call.           | No       |               |\n\n\u003e [!TIP]\n\u003e The `request_params` is provided as kwargs to the [`requests.request`](https://requests.readthedocs.io/en/latest/api/#requests.request). Check out the documentation to see which parameter is available.\n\n\u003e [!TIP]\n\u003e The archive created after the backup is a JSON with the following format:\n\u003e ```json\n\u003e {\n\u003e     \"url\": \"\u003cthe URL called\u003e\",\n\u003e     \"timestamp\": \"\u003cbackup timestamp\u003e\",\n\u003e     \"result\": \"\u003cAPI call status code\u003e\",\n\u003e     \"detail\": \"\u003cAPI response when JSON\u003e\",\n\u003e     \"msg\": \"\u003cAPI response body when not JSON\u003e\"\n\u003e }\n\u003e ```\n\n### Available destinations\n\n#### S3\n\n```json\n{\n    \"type\": \"s3\",\n    \"name\": \"\u003cdestination name\u003e\",\n    \"bucket\": \"my-bucket.for.backups\",\n    \"group\": true,\n    \"access_key_id\": \"XXXX\",\n    \"secret_access_key\": \"XXXX\",\n    \"prefix\": null,\n    \"endpoint_url\": \"https://\u003cs3 service\u003e\",\n    \"region\": \"us-east-1\"\n}\n```\n\n| Key                 | Description                                                                       | Required | Default value | Sensitive |\n| ------------------- | --------------------------------------------------------------------------------- | -------- | ------------- | --------- |\n| `type`              | Type of destination                                                               | Yes      | `\"s3\"`        | No        |\n| `name`              | Name of the destination                                                           | Yes      |               | No        |\n| `bucket`            | Name of the bucket to upload to                                                   | Yes      |               | No        |\n| `group`             | In case of multiple sources, whether to group all backups in a single tar archive | Yes      |               | No        |\n| `access_key_id`     | Access key to login to the S3 service                                             | Yes      |               | Yes       |\n| `secret_access_key` | Secret access key to login to the S3 service                                      | Yes      |               | Yes       |\n| `prefix`            | Prefix to the backup file                                                         | No       |               | No        |\n| `endpoint_url`      | Endpoint to the S3 service                                                        | No       |               | No        |\n| `region`            | Region of the S3 service                                                          | No       | `\"us-east-1\"` | No        |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbastantoine%2Fbackup-me","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbastantoine%2Fbackup-me","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbastantoine%2Fbackup-me/lists"}