{"id":39875036,"url":"https://github.com/rremizov/ansible-postgres-backup-operator","last_synced_at":"2026-01-18T14:23:47.473Z","repository":{"id":72390674,"uuid":"249126644","full_name":"rremizov/ansible-postgres-backup-operator","owner":"rremizov","description":"Ansible Role - Create and store PostgreSQL backups.","archived":false,"fork":false,"pushed_at":"2024-08-20T16:38:51.000Z","size":42,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-20T19:03:02.915Z","etag":null,"topics":["ansible","ansible-role","backup","postgres","postgresql"],"latest_commit_sha":null,"homepage":"","language":"Jinja","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/rremizov.png","metadata":{"files":{"readme":"README.rst","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":"2020-03-22T06:30:16.000Z","updated_at":"2024-08-20T16:38:57.000Z","dependencies_parsed_at":"2024-08-20T18:39:19.728Z","dependency_job_id":"bde1c4c7-25bc-433f-a420-3b14185c9fb1","html_url":"https://github.com/rremizov/ansible-postgres-backup-operator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rremizov/ansible-postgres-backup-operator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rremizov%2Fansible-postgres-backup-operator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rremizov%2Fansible-postgres-backup-operator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rremizov%2Fansible-postgres-backup-operator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rremizov%2Fansible-postgres-backup-operator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rremizov","download_url":"https://codeload.github.com/rremizov/ansible-postgres-backup-operator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rremizov%2Fansible-postgres-backup-operator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28537539,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T13:04:05.990Z","status":"ssl_error","status_checked_at":"2026-01-18T13:01:44.092Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["ansible","ansible-role","backup","postgres","postgresql"],"created_at":"2026-01-18T14:23:47.404Z","updated_at":"2026-01-18T14:23:47.463Z","avatar_url":"https://github.com/rremizov.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":".. sectnum::\n\nPostgres Backup Operator\n========================\n\nCreate and store PostgreSQL backups.\n\nFeatures\n--------\n\n- Uses `pg_basebackup`_ utility to take binary backups.\n- Uses `pg_dumpall`_ utility to take logical backups.\n- Uses `BorgBackup`_ to create versioned, deduplicated and encrypted backups.\n\nRequirements\n------------\n\n- Debian\n\nRole Vars\n---------\n\n``postgres_backup_operator_username``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nLinux username.\n\n``postgres_backup_operator_clusters``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nList of the PostgreSQL clusters to backup. See the schema in the examples below.\n\n``postgres_backup_operator_tmp_dir``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nPath to a directory for the temporary files.\n\nExample\n-------\n\nConfigure the backup host\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. code:: yaml\n\n    postgres_backup_operator_clusters:\n      - host: 1.2.3.4\n        port: 5432\n        username: postgres_backup_operator # PostgreSQL user to connect as.\n        password: password # BEWARE! Stored in plain text in the ~/.pgpass file!\n        backup_type: \"physical\" # \"physical\" or \"logical\"\n        max_rate: 8M # Used as is in the \"pg_basebackup --max-rate\" option.\n        borg_repository: /var/backups/postgres/1.2.3.4:5432/ # Path to the borg repository.\n        borg_passphrase: passphrase # BEWARE! Stored in plain text in the backup script! Optional.\n        borg_umask: \"0027\" # Default: \"0077\"\n        cron_month: \"*\"\n        cron_weekday: \"*\"\n        cron_day: \"*\"\n        cron_hour: \"0\"\n        cron_minute: \"0\"\n        suppress_mail_on_success: no # Use chronic to suppress unwanted mail from cron. Default: yes.\n        retention_within: 1d # Keep all archives within this interval.\n        retention_hourly: 24 # Number of hourly archives to keep.\n        retention_daily: 30 # Number of daily archives to keep.\n        retention_weekly: 12 # Number of weekly archives to keep.\n        retention_monthly: 12 # Number of monthly archives to keep.\n        retention_yearly: 3 # Number of yearly archives to keep.\n        post_backup_hook: # Optional. Bash snippet to execute after a backup.\n\nConfigure the database host\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nUse the `geerlingguy.postgresql`_ role to create a user and pg_hba.conf entry for backup connections.\n\n.. code:: yaml\n\n    postgresql_users:\n      - name: postgres_backup_operator\n        password: password\n        # REPLICATION is required by the pg_basebackup utility.\n        # SUPERUSER is required by the pg_dumpall utility.\n        role_attr_flags: LOGIN,REPLICATION,SUPERUSER\n        state: present\n\n    postgresql_hba_entries:\n      - type: hostssl\n        database: replication # Special value for replication connections.\n        user: postgres_backup_operator\n        address: \"10.8.0.0/24\" # E.g. connecting inside VPN.\n        auth_method: md5\n\n.. _geerlingguy.postgresql: https://github.com/geerlingguy/ansible-role-postgresql\n.. _BorgBackup: https://github.com/borgbackup\n.. _pg_basebackup: https://www.postgresql.org/docs/12/app-pgbasebackup.html\n.. _pg_dumpall: https://www.postgresql.org/docs/12/app-pg-dumpall.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frremizov%2Fansible-postgres-backup-operator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frremizov%2Fansible-postgres-backup-operator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frremizov%2Fansible-postgres-backup-operator/lists"}