{"id":24972229,"url":"https://github.com/fariosofernando/purrgres","last_synced_at":"2026-02-09T12:35:04.345Z","repository":{"id":262347645,"uuid":"886934526","full_name":"fariosofernando/Purrgres","owner":"fariosofernando","description":"An automatic backup tool for PostgreSQL in Docker containers.","archived":false,"fork":false,"pushed_at":"2024-12-11T07:36:55.000Z","size":2309,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-09T10:04:15.841Z","etag":null,"topics":["backup-tool","database","postgresql","rust-tools"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/fariosofernando.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":"2024-11-11T21:51:55.000Z","updated_at":"2024-12-12T06:11:11.000Z","dependencies_parsed_at":"2024-11-12T00:28:45.428Z","dependency_job_id":"810ad151-5be0-49ba-842f-8b39cc6e25f2","html_url":"https://github.com/fariosofernando/Purrgres","commit_stats":null,"previous_names":["hi-im-aurelio/purrgres---the-purr-in-your-database","fariosofernando/purrgres"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/fariosofernando/Purrgres","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fariosofernando%2FPurrgres","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fariosofernando%2FPurrgres/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fariosofernando%2FPurrgres/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fariosofernando%2FPurrgres/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fariosofernando","download_url":"https://codeload.github.com/fariosofernando/Purrgres/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fariosofernando%2FPurrgres/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270640792,"owners_count":24621016,"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-15T02:00:12.559Z","response_time":110,"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":["backup-tool","database","postgresql","rust-tools"],"created_at":"2025-02-03T17:08:23.971Z","updated_at":"2026-02-09T12:35:04.205Z","avatar_url":"https://github.com/fariosofernando.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg width=\"150px\" src=\"https://github.com/hi-im-aurelio/purrgres/raw/master/static/icone.webp\"\u003e\n\n# Purrgres - Backup Tool for PostgreSQL\n\nPurrgres is an automated PostgreSQL backup tool, specially tailored for environments using Docker containers. It allows you to perform daily backups of your PostgreSQL database, restore specific backups, and view the history of backups performed. With automatic intervals every 24 hours, Purrgres reduces the manual effort to ensure data security and recovery.\n\n\u003e Purrgres is a play on Postgres, but with a “purr” feel, as if it were\n\u003e a kitten taking care of the bank.\n\n## Features\n\n- **Automatic backup**: Performs backups of a PostgreSQL database in an automated way.\n- **Restore backups**: You can restore backups directly from the file.\n- **List backups**: Displays the list of backups performed, including date and time.\n- **Check backup status**: Monitor the status of the running backup process.\n- **Stop running backup**: Stop the backup process if necessary.\n\n## Semantic Versioning\n\nThis project follows [Semantic Versioning (SemVer)](https://semver.org/lang/en-US/), ensuring that versions are consistent and transparent. The version number is composed of three parts:\n\n- **MAJOR**: Incompatible API changes that may break backwards compatibility.\n- **MINOR**: Feature additions in a backwards compatible way.\n- **PATCH**: Bug fixes and performance improvements, without significant API changes.\n\n### Example:\n\n- `1.0.0` - First stable release.\n- `0.1.0` - New features added in a backwards compatible way.\n- `0.1.1` - Bug fixes.\n\nVersion transitions will be done according to SemVer principles, and any significant updates will be reflected in the version number.\n\n## How to Use\n\n### Download Binary\n\nBinaries are made available with each release for Linux operating systems, you can download the compiled version of `purrgres` for your operating\nsystem directly from the releases section of the [repository](https://github.com/hi-im-aurelio/purrgres/releases). There is no need to compile the\nsource code manually if you are a Linux user.\n\nOnce downloaded, unpack the file:\n\n```bash\n    tar -xvf /\u003cyou-download-path\u003e/purrgres*.tar.gz\n```\n\nCheck for the execution bit:\n\n```bash\n    chmod +x purrgres\n```\n\nAnd then execute Purrgres:\n\n```bash\n    ./purrgres\n```\n\nInclude the directory Purrgres is in, in your PATH Variable if you wish to be able to execute it anywhere.\n\nBash:\n\n```bash\n    echo 'export PATH=\"$PATH\":\"$HOME/\u003cpurrgres-path\u003e\"' \u003e\u003e ~/.bashrc\n```\n\nZsh:\n\n```bash\n    echo 'export PATH=\"$PATH\":\"$HOME/\u003cpurrgres-path\u003e\"' \u003e\u003e ~/.zshrc\n```\n\n### Use via Command Line\n\n1. **List Backups Performed**:\n   Displays all backups performed so far.\n\n    ```bash\n    ./purrgres --list-purrs\n    ```\n\n2. **Restore a Backup**\n   To restore a backup from a .sql file, use the --rpurry option.\n\n    ```bash\n    ./purrgres --rpurry backup.sql --user \u003cUSER\u003e --database \u003cDATABASE\u003e --container \u003cCONTAINER\u003e\n\n    ```\n\n3. **Check Running Backup Status**\n   Shows the status of the current backup, if any process is running.\n\n    ```bash\n    ./purrgres --stats\n\n    ```\n\n4. **Stop the Backup Process**\n   If the backup process is in progress, you can stop it.\n\n    ```bash\n    ./purrgres --stop\n\n    ```\n\n## How to Run Purrgres\n\nPurrgres can be run in different ways, depending on how you want the process to be managed.\n\n1. **Direct (foreground) execution**\n\n```bash\n./purrgres --user \u003cyour-data-owner\u003e --database \u003cyour-database-name\u003e --container \u003cyour-database-container-name\u003e\n```\n\nWhen you run the command directly, the process will run in the foreground in the terminal. This means that the terminal will be \"locked\" while the process is running, and you will not be able to use the terminal for other tasks while the backup is being performed. In addition, if you close the terminal or the SSH session (if you are working remotely), the process will be stopped.\n\n### When to use:\n\n- Ideal for quick tests or when you want to monitor the execution\n  of the program directly in the terminal.\n\n- Useful when you want to interact with the program and observe log\n  messages or results in real time.\n\n2. **Background Execution (with nohup)**\n\n```bash\nnohup ./purrgres --user \u003cyour-data-owner\u003e --database \u003cyour-database-name\u003e --container \u003cyour-database-container-name\u003e \u003e /dev/null 2\u003e\u00261 \u0026\n```\n\nRunning with nohup allows the program to run in the background. The nohup (no hang-up) command ensures that the process continues to run even if you close the terminal or SSH session. The \u0026 operator puts the process in the background, allowing you to continue using the terminal for other tasks. The \u003e /dev/null 2\u003e\u00261 redirection causes the program's standard output and errors to be discarded (not displayed in the terminal), which is useful when you don't want to see the log messages, but still want the process to continue running in the background.\n\n### When to use:\n\n- Ideal for long or automatic backups that need to be executed continuously, without interfering with your interaction with the terminal.\n\n- Necessary when you want to run the process in the background and continue using the terminal for other activities.\n\n- Useful for running the program on a remote server where you do not want to lose the backup execution if the SSH session is disconnected.\n\nMain Differences\n\n| Execution                | In the Foreground                                                                                                | In Background (with `nohup`)                                                                                                              |\n| ------------------------ | ---------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |\n| **Command**              | `./purrgres --user \u003cyour-data-owner\u003e --database \u003cyour-database-name\u003e --container \u003cyour-database-container-name\u003e` | `nohup ./purrgres --user \u003cyour-data-owner\u003e --database \u003cyour-database-name\u003e --container \u003cyour-database-container-name\u003e \u003e /dev/null 2\u003e\u00261 \u0026` |\n| **Behavior**             | The terminal is busy while the process is running.                                                               | The process runs in the background, and the terminal is freed up.                                                                         |\n| **Monitoring**           | You will see the output directly in the terminal.                                                                | The output is redirected to `/dev/null` and does not appear in the terminal.                                                              |\n| **Interaction**          | You can interact with the program in the terminal.                                                               | The program runs in the background without direct interaction.                                                                            |\n| **SSH/Terminal Session** | If the terminal is closed, the process is stopped.                                                               | The process will continue running even if the session is closed.                                                                          |\n\n## How to Compile\n\nIf you want to compile the source code yourself, follow these steps:\n\n1. **Clone the repository**\n\n```bash\ngit clone https://github.com/hi-im-aurelio/purrgres.git\ncd purrgres\n```\n\n2. **Compile the project**\n\n```bash\ncargo build --release\n```\n\nThe binary will be generated in the target/release/purrgres folder.\nYou can move it to the desired directory or use the cargo install command\nto install it globally.\n\n## Contributions\n\nIf you would like to contribute to the project, feel free to open pull\nrequests or report issues.\n\nBe sure to follow coding best practices and provide\nclear descriptions of your changes.\n\n## License\n\nThis project is licensed under the [MIT License](./LICENSE) - see the LICENSE file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffariosofernando%2Fpurrgres","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffariosofernando%2Fpurrgres","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffariosofernando%2Fpurrgres/lists"}