{"id":26662680,"url":"https://github.com/rohitramteke1/mysql-backup-manager","last_synced_at":"2026-05-08T04:39:18.091Z","repository":{"id":283293073,"uuid":"951293753","full_name":"rohitramteke1/mysql-backup-manager","owner":"rohitramteke1","description":"A Python-based MySQL backup automation tool with scheduled and manual backups using PowerShell and Windows Task Scheduler.","archived":false,"fork":false,"pushed_at":"2025-03-19T14:02:40.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-19T14:23:58.031Z","etag":null,"topics":["automation","backup","database-backup","mysql","powershell","python","task-scheduler"],"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/rohitramteke1.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":"2025-03-19T13:06:33.000Z","updated_at":"2025-03-19T14:06:17.000Z","dependencies_parsed_at":"2025-03-19T14:24:03.613Z","dependency_job_id":null,"html_url":"https://github.com/rohitramteke1/mysql-backup-manager","commit_stats":null,"previous_names":["rohitramteke1/mysql-backup-manager"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohitramteke1%2Fmysql-backup-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohitramteke1%2Fmysql-backup-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohitramteke1%2Fmysql-backup-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohitramteke1%2Fmysql-backup-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rohitramteke1","download_url":"https://codeload.github.com/rohitramteke1/mysql-backup-manager/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245476718,"owners_count":20621699,"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":["automation","backup","database-backup","mysql","powershell","python","task-scheduler"],"created_at":"2025-03-25T14:17:41.177Z","updated_at":"2026-05-08T04:39:13.050Z","avatar_url":"https://github.com/rohitramteke1.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MySQL Backup Manager\n\n![Used in case studies](https://img.shields.io/badge/case%20study-approved-brightgreen)\n\nMySQL Backup Manager is a simple Python-based tool that automates the backup of MySQL databases and stores them securely in an AWS S3 bucket. It allows users to schedule backups and store them in a specified directory or S3 bucket for easy access and management.\n\n---\n\n## 📌 Features\n- ✅ Automatic MySQL database backup using `mysqldump`\n- ✅ Configurable backup directory and database credentials\n- ✅ Timestamped backup files for easy tracking\n- ✅ Supports Windows Task Scheduler for automation\n\n---\n\n## 🛠 Prerequisites\nBefore using this project, ensure you have the following installed:\n- [Python 3.x](https://www.python.org/downloads/)\n- [MySQL Server](https://dev.mysql.com/downloads/mysql/)\n- `mysqldump` utility (included with MySQL)\n- PowerShell (for automation)\n\n---\n\n## 🚀 Installation\n\n### 1️⃣ Clone the repository\n```sh\ngit clone https://github.com/rohitramteke1/mysql-backup-manager.git\ncd mysql-backup-manager\n```\n\n### 2️⃣ Create and activate a virtual environment\n```sh\npython -m venv venv\nvenv\\Scripts\\activate  # Windows\n```\n\n### 3️⃣ Install dependencies\n```sh\npip install -r requirements.txt\n```\n\n### 4️⃣ Configure the `.env` file\nCreate a `.env` file in the project root and add:\n```ini\nDB_HOST=localhost\nDB_USER=root\nDB_PASSWORD=yourpassword\nDB_NAME=yourdatabase\nBACKUP_DIR=backups\n```\n\n---\n\n## 📂 Project Structure\n```bash\nmysql-backup-manager/\n│── backups/              # Directory to store backup files\n│── .github/              # GitHub Actions/CI pipeline configuration\n│── venv/                 # Virtual environment (ignored in Git)\n│── .env                  # Environment variables (ignored in Git)\n│── .gitignore            # Ignored files (venv, backups, etc.)\n│── auto_backup.ps1       # PowerShell script for scheduled backups\n│── backup.py             # Main script to perform MySQL backup\n│── restore.py            # Script to restore backups\n│── tests/                # Folder for test files\n│   └── test_backup.py    # Test file for the backup functionality\n│── requirements.txt      # Python dependencies\n│── README.md             # Documentation\n└── LICENSE               # License file\n\n```\n\n---\n\n## 🔹 Usage\n\n### ✅ Manual Backup\nRun the following command to create a backup manually:\n```sh\npython backup.py\n```\nThe backup will be stored in the `backups/` directory with a timestamped filename.\n\n---\n\n### ⏳ Automating Backups (Windows Task Scheduler)\nTo schedule a daily backup at 2:00 AM:\n```sh\ne.g. schtasks /create /tn \"MySQL Auto Backup\" /tr \"powershell -ExecutionPolicy Bypass -File \u003cyour-project-path\u003e\\auto_backup.ps1\" /sc daily /st 02:00\n\n\nschtasks /create /tn \"MySQL Auto Backup\" /tr \"powershell -ExecutionPolicy Bypass -File D:\\Projects\\Personal\\mysql-backup-manager\\auto_backup.ps1\" /sc daily /st 02:00\n```\n📌 *This step is optional for the project but demonstrates automation.*\n\n---\n\n### 🔄 Restore a Backup\nTo restore a backup, use:\n```sh\nmysql -h localhost -u root -p yourdatabase \u003c backups\\db_backup_YYYY-MM-DD_HH-MM-SS.sql\n```\n\n---\n\n## 💡 Contributing\nContributions are welcome! Feel free to submit issues or pull requests to improve this project.\n- [Rohit Ramteke](https://github.com/rohitramteke1) – Creator \u0026 Maintainer  \n- [Syed Siddiqui](https://github.com/SadeSiddiqui) – Educational case study and feedback | AI\n  \n---\n\n\n## 📜 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frohitramteke1%2Fmysql-backup-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frohitramteke1%2Fmysql-backup-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frohitramteke1%2Fmysql-backup-manager/lists"}