{"id":23282173,"url":"https://github.com/alilotfi23/dbcapsule","last_synced_at":"2026-05-08T03:35:54.156Z","repository":{"id":248281102,"uuid":"823558204","full_name":"alilotfi23/DBCapsule","owner":"alilotfi23","description":"This command-line tool allows you to back up MySQL and PostgreSQL databases easily using Python and Typer.","archived":false,"fork":false,"pushed_at":"2024-12-30T10:19:04.000Z","size":34,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T14:15:20.538Z","etag":null,"topics":["mysql","postgres","postgresql","python","typer"],"latest_commit_sha":null,"homepage":"","language":"Python","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/alilotfi23.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-07-03T09:01:11.000Z","updated_at":"2025-03-17T09:34:52.000Z","dependencies_parsed_at":"2024-07-13T17:28:23.228Z","dependency_job_id":"b678bd37-1f19-4706-888b-17c708c05785","html_url":"https://github.com/alilotfi23/DBCapsule","commit_stats":{"total_commits":18,"total_committers":1,"mean_commits":18.0,"dds":0.0,"last_synced_commit":"76bb6e0925460e0280335de7d316e7fbcd22be06"},"previous_names":["alilotfi23/dbcapsule"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/alilotfi23/DBCapsule","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alilotfi23%2FDBCapsule","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alilotfi23%2FDBCapsule/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alilotfi23%2FDBCapsule/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alilotfi23%2FDBCapsule/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alilotfi23","download_url":"https://codeload.github.com/alilotfi23/DBCapsule/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alilotfi23%2FDBCapsule/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32765572,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T02:36:36.067Z","status":"ssl_error","status_checked_at":"2026-05-08T02:36:07.210Z","response_time":54,"last_error":"SSL_read: 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":["mysql","postgres","postgresql","python","typer"],"created_at":"2024-12-20T00:14:53.187Z","updated_at":"2026-05-08T03:35:54.125Z","avatar_url":"https://github.com/alilotfi23.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Database Backup Tool\n\nThis command-line tool allows you to back up MySQL and PostgreSQL databases using Python and Typer.\n\n## Features\n\n- **Backup MySQL or PostgreSQL databases**\n- **Backup all databases or a single database**\n- **Dumps only the definitions of tablespaces no databases or roles (PostgreSQL)**\n- **Dumps only the schema no data (PostgreSQL)**\n- **Specify custom backup path**\n\n## Prerequisites\n\n- Python 3.x installed\n- Required Python packages (`typer`, `pathlib`)\n- MySQL (`mysqldump`) or PostgreSQL (`pg_dump`, `pg_dumpall`) command-line tools installed and accessible from the terminal\n\n## Installation\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/alilotfi23/DBCapsule.git\n   cd DBCapsule\n   ```\n\n2. Install dependencies:\n\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n## Usage\n\n### Command Syntax\n\n```bash\npython dbcapsule.py backup [OPTIONS]\n```\n\n### Options\n\n- `--db-type`: Specify the type of database (`mysql` or `postgres`).\n- `--all`: Backup all databases\n- `--single \u003cdatabase_name\u003e`: Backup a single database by name.\n- `--path \u003cbackup_path\u003e`: Path to store the backup file.\n\n### Examples\n\n1. **Backup all MySQL databases**:\n\n   ```bash\n   python dbcapsule.py --db-type mysql --all --path /path/to/your/backup/folder\n   ```\n\n2. **Backup single MySQL databases**:\n\n   ```bash\n    python dbcapsule.py --db-type mysql --single your_database_name --path /path/to/your/backup/folder\n   ```\n\n3. **Backup all PostgreSQL database**:\n\n   ```bash\n    python dbcapsule.py --db-type postgres --all --path /path/to/your/backup/folder\n   ```\n4. **Backup a single PostgreSQL database**:\n\n   ```bash\n   python dbcapsule.py --db-type postgres --single your_database_name --path /path/to/your/backup/folder\n   ```\n5. **Backup only the tablespaces of a single PostgreSQL database**:\n    ```bash\n    python dbcapsule.py backup --db-type postgres --single mydatabase --tablespaces --path /path/to/backup\n    ```\n6. **Backup only the schema of a single PostgreSQL database**:\n    ```bash\n    python dbcapsule.py backup --db-type postgres --single mydatabase --schema --path /path/to/backup\n    ```\n\n## Notes\n\n- Could you make sure to provide correct database credentials when prompted?\n- Ensure the specified backup path exists or allow the tool to create it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falilotfi23%2Fdbcapsule","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falilotfi23%2Fdbcapsule","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falilotfi23%2Fdbcapsule/lists"}