{"id":21258273,"url":"https://github.com/ubc/barman-docker","last_synced_at":"2026-01-02T12:08:33.347Z","repository":{"id":25688622,"uuid":"101538359","full_name":"ubc/barman-docker","owner":"ubc","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-30T17:19:15.000Z","size":72,"stargazers_count":21,"open_issues_count":0,"forks_count":35,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-21T21:33:55.644Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","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/ubc.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-08-27T08:02:52.000Z","updated_at":"2024-12-30T11:41:46.000Z","dependencies_parsed_at":"2024-10-30T18:21:50.445Z","dependency_job_id":"853d3554-b1ff-4c9d-a768-fab1a3ae882f","html_url":"https://github.com/ubc/barman-docker","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubc%2Fbarman-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubc%2Fbarman-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubc%2Fbarman-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubc%2Fbarman-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ubc","download_url":"https://codeload.github.com/ubc/barman-docker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243692442,"owners_count":20332196,"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":[],"created_at":"2024-11-21T04:08:00.227Z","updated_at":"2026-01-02T12:08:33.307Z","avatar_url":"https://github.com/ubc.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-barman\n\nThis repo contains files used to build a [docker](https://www.docker.com) image\nfor running [BaRMan](https://github.com/2ndquadrant-it/barman), the \"Backup and\nRecovery Manager for PostgreSQL.\"\n\nIt is easily used in conjunction with the `tbeadle/postgres:\u003cversion\u003e-barman`\nimages at https://hub.docker.com/r/tbeadle/postgres/.\n\n## Getting the image\n\n`docker-compose pull`\n\n## Building the image\n\nIf you would like to build the image yourself, simply run:\n\n`docker-compose build`\n\n## Running the image\n\nRunning the image can be as simple as\n\n`docker-compose up`\n\nbut you will likely want to create your own `docker-compose.yml` file to define\nvolumes that will be mounted for persistent data.  See the ***Environment\nvariables*** section below.\n\nThe barman program is run inside the container as the `barman` user.  If you\nenter a shell in the container and want to run barman commands, make sure to run\nthem as the `barman` user using `gosu barman \u003cbarman command\u003e`.  For example:\n\n```\ngosu barman barman check all\ngosu barman barman backup all\n```\n\n## Examples of usage\n\nSee the examples/ directory for examples of how to use this image.\n\n * ***streaming***: The remote database server streams its WAL logs to barman.\n   This reduces the \"Recovery Point Objective (RPO)\" to nearly 0.  RPO is the\n   \"maximum amount of data you can afford to lose.\"\u003csup\u003e[1](#barman_docs)\u003c/sup\u003e\n   This example also sets up  a weekly cron job to take incremental base backups\n   using rsync.  This helps reduce the time that would be required to play back\n   the WAL files in a disaster recovery situation.\n\nCurrently only streaming of WAL logs is supported.  Using postgres's\n`archive_command` functionality is not supported at this time.\n\n## Environment variables\n\nThe following environment variables may be set when starting the container:\n\n| Name                               | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |\n| ----                               | -----------                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |\n| BARMAN_CRON_SRC                    | This directory holds files that will be copied in to `/etc/cron.d/` and have the correct permissions set so that they will be run via cron.  This can be used as a place to put cron jobs for performing regular basebackups.  Defaults to `/private/cron.d`.\n| BARMAN_LOG_DIR                     | The location where log files can be stored.  For example, a cron job can be set up to take regular full backups and that can send its logs here.  Defaults to `/var/log/barman`.                                                                                                                                                                                                                                                                                                                                                                        |\n| BARMAN_SSH_KEY_DIR                 | This directory in the container (most likely mounted as a volume) should contain SSH private key files that are used when connecting via SSH to the database servers that you're backing up.  This happens if the `backup_method` defined in the barman config for the server is set to `rsync`.  The `ssh_command` for that server should include `-i /home/barman/.ssh/\u003cprivate_key_filename\u003e`.  Note that the keys are copied from this directory to /home/barman/.ssh/ to ensure ownership/permissions are properly set.  Defaults to /private/ssh. |\n| BARMAN_CRON_SCHEDULE               | `* * * * *`, barman cron running scheduel\n| BARMAN_BACKUP_SCHEDULE             | `0 4 * * *`, barman backup running schedule\n| BARMAN_LOG_LEVEL                   | `INFO`, barman log level\n| DB_HOST                            | `pg`, postgres host name\n| DB_PORT                            | `5432`, postgres port\n| DB_SUPERUSER                       | `postgres`, superuser username\n| DB_SUPERUSER_PASSWORD              | `postgres`, superuser password\n| DB_SUPERUSER_DATABASE              | `postgres`, superuser database\n| DB_REPLICATION_USER                | `standby`, replication username\n| DB_REPLICATION_PASSWORD            | `standby`, replication user password\n| DB_SLOT_NAME                       | `barman`, postgres replication slot name for barman\n| DB_BACKUP_METHOD                   | `postgres`, barman backup method, see barman backup\n\n## Volumes\n\n| Path                     | Description                                                                      |\n|--------------------------|----------------------------------------------------------------------------------|\n| /home/barman/.ssh/id_rsa | The private ssh key that barman will use to connect to remote host when recovery |\n\n## Footnotes:\n\n\u003ca name='barman_docs'\u003e\u003csup\u003e1\u003c/sup\u003e\u003c/a\u003e: [Barman Documentation](http://docs.pgbarman.org/release/2.1/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubc%2Fbarman-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fubc%2Fbarman-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubc%2Fbarman-docker/lists"}