{"id":13765227,"url":"https://github.com/mmuller88/influxdb-s3-backup","last_synced_at":"2025-07-24T10:39:24.316Z","repository":{"id":40290670,"uuid":"329203212","full_name":"mmuller88/influxdb-s3-backup","owner":"mmuller88","description":"A docker image based on InfluxDB and enhanced with awc cli + backupscripts which is runnable on arm64 (raspberries) as well.","archived":false,"fork":false,"pushed_at":"2022-10-14T20:06:24.000Z","size":452,"stargazers_count":1,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-10T11:12:50.449Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mmuller88.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}},"created_at":"2021-01-13T05:26:38.000Z","updated_at":"2024-02-05T20:02:03.000Z","dependencies_parsed_at":"2023-01-19T20:46:10.401Z","dependency_job_id":null,"html_url":"https://github.com/mmuller88/influxdb-s3-backup","commit_stats":null,"previous_names":[],"tags_count":57,"template":false,"template_full_name":null,"purl":"pkg:github/mmuller88/influxdb-s3-backup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmuller88%2Finfluxdb-s3-backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmuller88%2Finfluxdb-s3-backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmuller88%2Finfluxdb-s3-backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmuller88%2Finfluxdb-s3-backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mmuller88","download_url":"https://codeload.github.com/mmuller88/influxdb-s3-backup/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmuller88%2Finfluxdb-s3-backup/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266829014,"owners_count":23991222,"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","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-08-03T16:00:35.735Z","updated_at":"2025-07-24T10:39:24.292Z","avatar_url":"https://github.com/mmuller88.png","language":"Shell","funding_links":[],"categories":["Projects using Projen"],"sub_categories":["NodeProject"],"readme":"![Release](https://github.com/mmuller88/influxdb-s3-backup/workflows/Release/badge.svg)\n![push-docker](https://github.com/mmuller88/influxdb-s3-backup/workflows/push-docker/badge.svg)\n\n# influxdb-s3-backup\n\nA docker container for backing up your InfluxDB to AWS S3. It works on a Raspberry Pi as well.\n\n# Docker Hub\n\nReleased to [Docker Hub](https://hub.docker.com/repository/docker/damadden88/influxdb-s3-backup). Supported platforms: linux/amd64,linux/arm64\n\n# Usage\n\n## Default cron (1am daily)\n\n```shell\ndocker run \\\n    -e DATABASE=mydatabase \\\n    -e DATABASE_HOST=1.2.3.4 \\\n    -e S3_BUCKET=mybackupbucket \\\n    -e AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE \\\n    -e AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY \\\n    -e AWS_DEFAULT_REGION=us-west-2 \\\n    damadden88/influxdb-to-s3:latest\n```\n\nor if you just start your docker compose deployment\n\n## Run Docker Container\n\n```shell\ndocker run \\\n    -e DATABASE=mydatabase \\\n    -e DATABASE_HOST=1.2.3.4 \\\n    -e S3_BUCKET=mybackupbucket \\\n    -e AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE \\\n    -e AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY \\\n    -e AWS_DEFAULT_REGION=us-west-2 \\\n    damadden88/influxdb-to-s3:latest\n```\n\n## Docker Compose deployment\n\n### Preparation\n\nYou need to set you AWS Credentials before like:\n\n```\nexport AWS_ACCESS_KEY_ID=AKIAxx\nexport AWS_SECRET_ACCESS_KEY=7PBRxx\n```\n\nAnd than run:\n\n```\ndocker-compose up -d --build\n```\n\n### Example\n\n```yaml\nversion: '3.3'\n\nservices:\n  influxdb:\n    image: influxdb:latest\n    environment:\n      INFLUXDB_DB: mydb\n      INFLUXDB_BIND_ADDRESS: 0.0.0.0:8088\n  influxdbs3backup:\n    build:\n      context: .\n    environment:\n      DATABASE: mydb\n      DATABASE_HOST: influxdb\n      S3_BUCKET: mybackupbucket\n      AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE\n      AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY\n      AWS_DEFAULT_REGION: us-west-2\n      CRON: '* * * * *'\n```\n\n### Run backup\n\n```shell\ndocker run \\\n    -e DATABASE=mydatabase \\\n    -e DATABASE_HOST=1.2.3.4 \\\n    -e S3_BUCKET=mybackupbucket \\\n    -e AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE \\\n    -e AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY \\\n    -e AWS_DEFAULT_REGION=us-west-2 \\\n    damadden88/influxdb-to-s3:latest \\\n    backup\n```\n\n### Restore\n\n**Warning** - Restores [cannot be run on a running InfluxDB instance](https://docs.influxdata.com/influxdb/v1.1/administration/backup_and_restore/#restore), which precludes doing a remote restore. This means there is a requirement for the restore container to have local access to the influxdb `meta` and `data` directories, which are probably located in `/var/lib/influxdb` unless you've done something non-standard. You must therefore pass in the influxdb directory as a volume instead of specifying the host.\n\n```shell\ndocker run \\\n    -v /path/to/influxdb:/var/lib/influxdb \\\n    -e DATABASE=mydatabase \\\n    -e S3_BUCKET=mybackupbucket \\\n    -e AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE \\\n    -e AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY \\\n    -e AWS_DEFAULT_REGION=us-west-2 \\\n    damadden88/influxdb-to-s3:latest \\\n    restore\n```\n\n# Environment Variables\n\n| Variable                |                     Description                      |                 Example Usage |                  Default |                    Optional? |\n| ----------------------- | :--------------------------------------------------: | ----------------------------: | -----------------------: | ---------------------------: |\n| `DATABASE`              |                  Database to backup                  |                    `telegraf` |                     None |                           No |\n| `S3_BUCKET`             |                    Name of bucket                    |                `mybucketname` |                     None |                           No |\n| `S3_KEY_PREFIX`         |            S3 directory to place files in            | `backups` or `backups/sqlite` |                     None |                          Yes |\n| `AWS_ACCESS_KEY_ID`     |                    AWS Access key                    |                   `AKIAIO...` |                     None | Yes (if using instance role) |\n| `AWS_SECRET_ACCESS_KEY` |                    AWS Secret Key                    |              `wJalrXUtnFE...` |                     None | Yes (if using instance role) |\n| `AWS_DEFAULT_REGION`    |                  AWS Default Region                  |                   `us-west-2` |              `us-west-1` |                          Yes |\n| `DATABASE_HOST`         |         Hostname or IP of influxdb instance          |                     `1.2.3.4` |              `localhost` |                          Yes |\n| `DATABASE_PORT`         |              Port of influxdb instance               |                        `8098` |                   `8088` |                          Yes |\n| `DATABASE_META_DIR`     |           Path to local influxdb meta dir            |      `/path/to/influxdb/meta` | `/var/lib/influxdb/meta` |                          Yes |\n| `DATABASE_DATA_DIR`     |           Path to local influxdb data dir            |      `/path/to/influxdb/data` | `/var/lib/influxdb/data` |                          Yes |\n| `BACKUP_PATH`           | Directory to write the backup (within the container) |          `/myvolume/mybackup` |  `/data/influxdb/backup` |                          Yes |\n| `BACKUP_ARCHIVE_PATH`   |  Path to compress the backup (within the container)  |      `/myvolume/mybackup.tgz` |     `${BACKUP_PATH}.tgz` |                          Yes |\n\n# Thanks To:\n\n- Jacob Tomlinson https://github.com/jacobtomlinson/docker-influxdb-to-s3\n- And to the amazing [Projen Community](https://github.com/projen/projen)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmuller88%2Finfluxdb-s3-backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmmuller88%2Finfluxdb-s3-backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmuller88%2Finfluxdb-s3-backup/lists"}