{"id":18011482,"url":"https://github.com/tmiland/pgbackup","last_synced_at":"2025-08-24T01:10:13.094Z","repository":{"id":70815588,"uuid":"178087583","full_name":"tmiland/pgbackup","owner":"tmiland","description":"Automated PostgreSQL Backup on Linux","archived":false,"fork":false,"pushed_at":"2021-01-28T14:55:01.000Z","size":10,"stargazers_count":17,"open_issues_count":0,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-07T19:51:18.216Z","etag":null,"topics":["database-backup","database-backup-scripts","postgres-database","postgresql","postgresql-backup","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/tmiland.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":"2019-03-27T23:03:35.000Z","updated_at":"2025-03-25T09:05:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"0e13d0a6-da17-4d05-a519-aa637e1063a8","html_url":"https://github.com/tmiland/pgbackup","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tmiland/pgbackup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmiland%2Fpgbackup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmiland%2Fpgbackup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmiland%2Fpgbackup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmiland%2Fpgbackup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tmiland","download_url":"https://codeload.github.com/tmiland/pgbackup/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmiland%2Fpgbackup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271778236,"owners_count":24819265,"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-08-23T02:00:09.327Z","response_time":69,"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":["database-backup","database-backup-scripts","postgres-database","postgresql","postgresql-backup","postgresql-database"],"created_at":"2024-10-30T03:10:48.704Z","updated_at":"2025-08-24T01:10:13.063Z","avatar_url":"https://github.com/tmiland.png","language":"Shell","readme":"# pgbackup - Automated PostgreSQL Backup on Linux\n\n```\n                  ╔═══════════════════════════════════════════════════════════════════╗\n                  ║                           Pg Backup.sh                            ║\n                  ║                Automated PostgreSQL Backup on Linux               ║\n                  ║                      Maintained by @tmiland                       ║\n                  ║                          version: 1.0.0                           ║\n                  ╚═══════════════════════════════════════════════════════════════════╝\n```\n\n[![GitHub release](https://img.shields.io/github/release/tmiland/pgbackup.svg?style=for-the-badge)](https://github.com/tmiland/pgbackup/releases)\n[![licence](https://img.shields.io/github/license/tmiland/pgbackup.svg?style=for-the-badge)](https://github.com/tmiland/pgbackup/blob/master/LICENSE)\n![Bash](https://img.shields.io/badge/Language-SH-4EAA25.svg?style=for-the-badge)\n\n## Automated PostgreSQL Backup on Linux \n\n* MONTHLY BACKUPS\n* WEEKLY BACKUPS\n* DAILY BACKUPS\n* FULL BACKUPS\n* SCHEMA-ONLY BACKUPS\n* GLOBALS BACKUPS\n\n## Installation\n\n#### Download and execute the script:\n\n```bash\n$ git clone https://github.com/tmiland/pgbackup.git\n$ cd pgbackup\n$ chmod +x pg_backup_rotated.sh \u0026\u0026 chmod +x pg_backup.sh\n$ ./pg_backup.sh\n```\n\n# Default Configuration\n\n### Edit preferences\n\n```bash\n# Optional system user to run backups as.  If the user the script is running as doesn't match this\n# the script terminates.  Leave blank to skip check.\nBACKUP_USER=root\n \n# Optional hostname to adhere to pg_hba policies.  Will default to \"localhost\" if none specified.\nHOSTNAME=localhost\n \n# Optional username to connect to database as.  Will default to \"postgres\" if none specified.\nUSERNAME=postgres\n \n# This dir will be created if it doesn't exist.  This must be writable by the user the script is\n# running as.\nBACKUP_DIR=/home/backup/database/postgresql/\n \n# List of strings to match against in database name, separated by space or comma, for which we only\n# wish to keep a backup of the schema, not the data. Any database names which contain any of these\n# values will be considered candidates. (e.g. \"system_log\" will match \"dev_system_log_2010-01\")\nSCHEMA_ONLY_LIST=\"\"\n \n# Will produce a custom-format backup if set to \"yes\"\nENABLE_CUSTOM_BACKUPS=yes\n \n# Will produce a gzipped plain-format backup if set to \"yes\"\nENABLE_PLAIN_BACKUPS=yes\n \n# Will produce gzipped sql file containing the cluster globals, like users and passwords, if set to \"yes\"\nENABLE_GLOBALS_BACKUPS=yes\n \n \n#### SETTINGS FOR ROTATED BACKUPS ####\n \n# Which day to take the weekly backup from (1-7 = Monday-Sunday)\nDAY_OF_WEEK_TO_KEEP=5\n \n# Number of days to keep daily backups\nDAYS_TO_KEEP=7\n \n# How many weeks to keep weekly backups\nWEEKS_TO_KEEP=5\n```\n\n## Credits\n\nSource: https://wiki.postgresql.org/wiki/Automated_Backup_on_Linux\n\n## Donations \n- [PayPal me](https://paypal.me/milanddata)\n- [BTC] : 33mjmoPxqfXnWNsvy8gvMZrrcG3gEa3YDM\n\n## Web Hosting\n\nSign up for web hosting using this link, and receive $100 in credit over 60 days.\n\n[DigitalOcean](https://m.do.co/c/f1f2b475fca0)\n\n#### Disclaimer \n\n*** ***Use at own risk*** ***\n\n### License\n\n[![MIT License Image](https://upload.wikimedia.org/wikipedia/commons/thumb/0/0c/MIT_logo.svg/220px-MIT_logo.svg.png)](https://github.com/tmiland/pgbackup/blob/master/LICENSE)\n\n[MIT License](https://github.com/tmiland/pgbackup/blob/master/LICENSE)\n","funding_links":["https://paypal.me/milanddata"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmiland%2Fpgbackup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftmiland%2Fpgbackup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmiland%2Fpgbackup/lists"}