{"id":19714911,"url":"https://github.com/moeen/psql-partitions-auto-backup","last_synced_at":"2026-05-15T10:03:12.961Z","repository":{"id":128402513,"uuid":"461464092","full_name":"moeen/psql-partitions-auto-backup","owner":"moeen","description":"Backup and drop partitioned tables in PostgresQL","archived":false,"fork":false,"pushed_at":"2022-02-20T11:44:57.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-10T15:15:03.265Z","etag":null,"topics":["backup","partman","postgres","postgresql"],"latest_commit_sha":null,"homepage":"","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/moeen.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":"2022-02-20T11:18:33.000Z","updated_at":"2022-11-01T08:50:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"be6de06e-b039-4bfa-8b14-3c3b891209d9","html_url":"https://github.com/moeen/psql-partitions-auto-backup","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moeen%2Fpsql-partitions-auto-backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moeen%2Fpsql-partitions-auto-backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moeen%2Fpsql-partitions-auto-backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moeen%2Fpsql-partitions-auto-backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moeen","download_url":"https://codeload.github.com/moeen/psql-partitions-auto-backup/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241035980,"owners_count":19898095,"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":["backup","partman","postgres","postgresql"],"created_at":"2024-11-11T22:36:31.772Z","updated_at":"2026-05-15T10:03:12.906Z","avatar_url":"https://github.com/moeen.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PostgresQL partiotioned tables automated backup and drop\n\nThis script will help you to create automated backup (**compressed**) and automated deletion for your PostgresQL partitioned tables.\n\n\u003e NOTE: This only works if you configured pg_partman to create partiotions weekly.\n\n## Steps\n\n### Install these packages\n1. `postgres-clinet`\n2. `openssh-client`\n2. `rsync`\n\n### Configure the script\nOpen `psql-partitions-auto-backup.bash` and set these variables:\n- `CONNECTION_STRING`: Your PostgresQL connection string\n- `BACKUP_SERVER`: Server that you want to store your backups on. Should have SSH.\n- `BACKUP_DIR`: Directory in `\u003cBACKUP_SERVER\u003e` which backups will be saved to.\n- `DATABASE_NAME`: Your PostgresQL database name.\n- `TABLE_NAME`: Name of the table that has partitioning.\n- `TABLES_TO_KEEP`: Number of tables to keep.\n\n### Run the script\n\n```sh\nchmod +x psql-partitions-auto-backup.bash\n./psql-partitions-auto-backup.bash\n```\n\nAlso you can add it as a cron job.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoeen%2Fpsql-partitions-auto-backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoeen%2Fpsql-partitions-auto-backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoeen%2Fpsql-partitions-auto-backup/lists"}