{"id":23388241,"url":"https://github.com/abdullahmaqbool22/automated-backup-script","last_synced_at":"2026-04-16T04:32:08.091Z","repository":{"id":266131766,"uuid":"897487028","full_name":"AbdullahMaqbool22/Automated-Backup-Script","owner":"AbdullahMaqbool22","description":"This project is a Python script designed to automate the backup process of important files. It creates a zip archive of specified directories, retains recent backups based on a set retention period, and sends email notifications upon successful or failed backups. The script is ideal for ensuring data safety by maintaining automated backups.","archived":false,"fork":false,"pushed_at":"2024-12-02T18:11:15.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-08T13:22:02.430Z","etag":null,"topics":["backup","backup-script","linux","macos","python"],"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/AbdullahMaqbool22.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-12-02T18:03:00.000Z","updated_at":"2024-12-02T18:11:19.000Z","dependencies_parsed_at":"2024-12-02T19:36:21.911Z","dependency_job_id":null,"html_url":"https://github.com/AbdullahMaqbool22/Automated-Backup-Script","commit_stats":null,"previous_names":["abdullahmaqbool22/linux-backup-scripts"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbdullahMaqbool22%2FAutomated-Backup-Script","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbdullahMaqbool22%2FAutomated-Backup-Script/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbdullahMaqbool22%2FAutomated-Backup-Script/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbdullahMaqbool22%2FAutomated-Backup-Script/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AbdullahMaqbool22","download_url":"https://codeload.github.com/AbdullahMaqbool22/Automated-Backup-Script/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247850229,"owners_count":21006560,"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","backup-script","linux","macos","python"],"created_at":"2024-12-22T02:18:21.083Z","updated_at":"2026-04-16T04:32:08.054Z","avatar_url":"https://github.com/AbdullahMaqbool22.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Automated Backup Script\n\n## Overview\n\nThis Python script automates the backup of important files by creating a compressed archive, managing backup retention, and sending email notifications about the backup status. It ensures data safety with automated processes for backup creation and cleanup.\n\n---\n\n## Features\n\n- **Automated Backup Creation:** Compresses files from a specified source directory into a timestamped ZIP archive.\n- **Retention Management:** Deletes old backups beyond a configurable retention period.\n- **Email Notifications:** Sends an email notification upon successful or failed backup attempts.\n\n---\n\n## Requirements\n\n- Python 3.x\n- Required modules:\n  - `os`\n  - `datetime`\n  - `zipfile`\n  - `smtplib`\n  - `email.mime.text`\n\n---\n\n## Configuration\n\nCustomize the following variables in the script according to your needs:\n\n### Directories:\n- `source_dir`: Path to the directory containing files to be backed up.\n- `backup_dir`: Path to store the backup archives.\n\n### Backup Retention:\n- `retention_days`: Number of days to keep old backups.\n\n### Email Settings:\n- `email_notifications`: Set to `True` to enable email notifications.\n- `email_recipient`: Email address to receive notifications.\n- `email_sender`: Sender's email address.\n- `smtp_server`: SMTP server address (default: `smtp.gmail.com`).\n- `smtp_port`: Port for the SMTP server (default: `587`).\n- `smtp_user`: SMTP user email.\n- `smtp_pass`: SMTP user password (ensure this is secure).\n\n---\n\n## Usage\n\n1. Clone or download this repository.\n2. Update the configuration section with your specific directories and email settings.\n3. Run the script using:\n\n   ```bash\n   python backup_script.py\n   ```\n\n---\n\n## Example Configuration\n\n```python\nsource_dir = \"/home/kali/Desktop/important_files\"\nbackup_dir = \"/home/kali/Desktop/backups\"\nretention_days = 7\nemail_notifications = True\n\nemail_recipient = \"example_recipient@gmail.com\"\nemail_sender = \"example_sender@gmail.com\"\nsmtp_server = \"smtp.gmail.com\"\nsmtp_port = 587\nsmtp_user = \"your_email@gmail.com\"\nsmtp_pass = \"your_email_password\"\n```\n\n---\n\n## License\n\nThis project is licensed under the MIT License.\n\n---\n\n### Author\n\nDeveloped by Mohamed Ahsan Wakir \u0026 Abdullah Maqbool.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdullahmaqbool22%2Fautomated-backup-script","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabdullahmaqbool22%2Fautomated-backup-script","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdullahmaqbool22%2Fautomated-backup-script/lists"}