{"id":22141191,"url":"https://github.com/kanewi11/db-telegram-backup","last_synced_at":"2026-04-11T02:14:17.712Z","repository":{"id":264183213,"uuid":"892555722","full_name":"kanewi11/db-telegram-backup","owner":"kanewi11","description":"Backup MySQL, MariaDB or PostgreSQL databases from Docker to Telegram chat","archived":false,"fork":false,"pushed_at":"2024-11-22T14:28:06.000Z","size":19,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-29T16:30:55.528Z","etag":null,"topics":["backup","database","docker","mariadb","mysql","postgresql"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kanewi11.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-22T10:38:37.000Z","updated_at":"2024-12-14T12:10:18.000Z","dependencies_parsed_at":"2024-11-22T21:20:41.607Z","dependency_job_id":null,"html_url":"https://github.com/kanewi11/db-telegram-backup","commit_stats":null,"previous_names":["kanewi11/db-telegram-backup"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanewi11%2Fdb-telegram-backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanewi11%2Fdb-telegram-backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanewi11%2Fdb-telegram-backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanewi11%2Fdb-telegram-backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kanewi11","download_url":"https://codeload.github.com/kanewi11/db-telegram-backup/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245258215,"owners_count":20585977,"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","database","docker","mariadb","mysql","postgresql"],"created_at":"2024-12-01T21:11:11.878Z","updated_at":"2026-04-11T02:14:17.664Z","avatar_url":"https://github.com/kanewi11.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\r\n# DB Telegram Backup\r\n\r\nA Python-based solution to backup data via Telegram with an easy setup process and periodic task scheduling using `crontab`.\r\n\r\n# Supported databases\r\n\r\n- `PostgreSQL`\r\n- `MySQL`\r\n- `MariaDB`\r\n\r\n## Installation\r\n\r\nFollow the steps below to install the project:\r\n\r\n1. Navigate to the `/opt` directory:\r\n    ```bash\r\n    cd /opt\r\n    ```\r\n2. Clone the repository:\r\n    ```bash\r\n    sudo git clone https://github.com/kanewi11/db-telegram-backup.git\r\n    ```\r\n3. Enter the project directory:\r\n    ```bash\r\n    cd /opt/db-telegram-backup\r\n    ```\r\n4. Update the package list and install Python pip:\r\n    ```bash\r\n    sudo apt-get update -y \u0026\u0026 sudo apt-get install python3-pip -y\r\n    ```\r\n5. Install Poetry (Python dependency manager):\r\n    ```bash\r\n    curl -sSL https://install.python-poetry.org | python3 -\r\n    ```\r\n6. Add Poetry to the system path:\r\n    ```bash\r\n    export PATH=\"$HOME/.local/bin:$PATH\"\r\n    ```\r\n7. Configure Poetry to use project-local virtual environments:\r\n    ```bash\r\n    sudo poetry config virtualenvs.in-project true\r\n    ```\r\n8. Install the project dependencies using Poetry:\r\n    ```bash\r\n    sudo poetry install\r\n    ```\r\n\r\n\r\n## Setting Up Before Starting\r\n\r\nPrepare the environment and perform a functional check:\r\n\r\n1. Navigate to the project directory:\r\n    ```bash\r\n    cd /opt/db-telegram-backup\r\n    ```\r\n2. Create a `.env` file from the example template:\r\n    ```bash\r\n    sudo cp .envs/.env.example .envs/.env\r\n    ```\r\n3. Open the `.env` file for editing:\r\n    ```bash\r\n    sudo nano .envs/.env\r\n    ```\r\n4. Activate the virtual environment:\r\n    ```bash\r\n    sudo poetry shell\r\n    ```\r\n5. Run the main script to verify functionality:\r\n    ```bash\r\n    sudo python main.py\r\n    ```\r\n\r\n## Automating with Crontab\r\n\r\nSet up a cron job to automate the backup process:\r\n\r\n1. Open the crontab editor:\r\n    ```bash\r\n    sudo crontab -e\r\n    ```\r\n2. Add the following line to schedule the script to run hourly:\r\n    ```\r\n    0 * * * * cd /opt/db-telegram-backup/ \u0026\u0026 .venv/bin/python main.py\r\n    ```\r\n    This runs the script at the start of every hour.\r\n\r\n\r\n## Contributing\r\n\r\nFeel free to contribute by submitting issues or pull requests to the GitHub repository. I won't answer or respond to them anyway :) \r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkanewi11%2Fdb-telegram-backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkanewi11%2Fdb-telegram-backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkanewi11%2Fdb-telegram-backup/lists"}