{"id":20713256,"url":"https://github.com/lawitschka/docker-postgresql-s3-backup","last_synced_at":"2026-04-29T23:33:07.170Z","repository":{"id":139216867,"uuid":"96419002","full_name":"lawitschka/docker-postgresql-s3-backup","owner":"lawitschka","description":"Docker image for creating PostgreSQL database backups stored in S3","archived":false,"fork":false,"pushed_at":"2017-07-07T07:10:57.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-13T14:46:18.463Z","etag":null,"topics":["backup","database","docker-container","postgresql-database"],"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/lawitschka.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":"2017-07-06T10:32:32.000Z","updated_at":"2017-07-11T18:03:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"867bbf51-5fe2-4d62-a2bb-0df487df64d5","html_url":"https://github.com/lawitschka/docker-postgresql-s3-backup","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/lawitschka/docker-postgresql-s3-backup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lawitschka%2Fdocker-postgresql-s3-backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lawitschka%2Fdocker-postgresql-s3-backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lawitschka%2Fdocker-postgresql-s3-backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lawitschka%2Fdocker-postgresql-s3-backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lawitschka","download_url":"https://codeload.github.com/lawitschka/docker-postgresql-s3-backup/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lawitschka%2Fdocker-postgresql-s3-backup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32448399,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"ssl_error","status_checked_at":"2026-04-29T22:10:49.234Z","response_time":110,"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","database","docker-container","postgresql-database"],"created_at":"2024-11-17T02:24:08.648Z","updated_at":"2026-04-29T23:33:07.151Z","avatar_url":"https://github.com/lawitschka.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PostgreSQL S3 Backup\n\nThis Docker container enables you to backup a PostgreSQL database to AWS S3. The\ncontainer dumps the database using `pg_dump`, creates a gzipped tarball of the\ndump, and uploads the tarball to S3.\n\nThe container does not handle the scheduling of the backup. The actual backup\nhas to be invoked from an external service like `cron`, a `cron` Docker\ncontainer, Jenkins, etc.\n\n# Usage\n\nCredentials and connection details are required to be passed into the container\nthrough environment variables. This enables you to create your derivant of the\nimage for your specific use case. The following environment variables are\nexpected:\n\n* `PG_HOST` (optional, default `db`)\n* `PG_PORT` (optional, default `5432`)\n* `PG_USER` (optional, default `postgres`)\n* `PG_PASS` (optional, no default value)\n* `AWS_REGION`\n* `AWS_ACCESS_KEY`\n* `AWS_SECRET_ACCESS_KEY`\n\nTo run the backup for a locally deployed database, link the database\ncontainer into the backup container:\n\n```\n$\u003e docker run --link db_container:db \\\n              -e AWS_REGION=eu-central-1 \\\n              -e AWS_ACCESS_KEY_ID=12345 \\\n              -e AWS_SECRET_ACCESS_KEY=qwertz \\\n              lawitschka/postgresql-s3-backup \\\n              s3_bucket/path/in/bucket example_db\n```\n\nThis will dump the database `example_db` into an archive called\n`example_db-XXXXXXXXXX.sql.tar.gz`. The `XXXXXXXXXX` will be\nreplaced with a UNIX epoch at the time of the backup. The backup script then\nuploads the archive to a S3 bucket called `s3_bucket` and into the folder\n`path/in/bucket`.\n\nAlternatively, the database host can be defined through usage of the `PG_`\nenvironment variables:\n\n```\n$\u003e docker run -e AWS_REGION=eu-central-1 \\\n              -e AWS_ACCESS_KEY_ID=12345 \\\n              -e AWS_SECRET_ACCESS_KEY=qwertz \\\n              -e PG_HOST=db.example.com \\\n              -e PG_USER=nondefaultuser \\\n              lawitschka/postgresql-s3-backup \\\n              s3_bucket/path/in/bucket example_db\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flawitschka%2Fdocker-postgresql-s3-backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flawitschka%2Fdocker-postgresql-s3-backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flawitschka%2Fdocker-postgresql-s3-backup/lists"}