{"id":19890620,"url":"https://github.com/realtriassic/mysql-backup","last_synced_at":"2026-04-30T11:32:21.086Z","repository":{"id":193312105,"uuid":"688542235","full_name":"RealTriassic/MySQL-Backup","owner":"RealTriassic","description":"A bash script to automatically dump, compress and store your MySQL/MariaDB database backups.","archived":false,"fork":false,"pushed_at":"2023-09-07T15:37:46.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-20T00:56:40.918Z","etag":null,"topics":["backup","backup-script","bash","mariadb","mysql","mysqldump-backup"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RealTriassic.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}},"created_at":"2023-09-07T15:03:34.000Z","updated_at":"2023-11-22T13:51:54.000Z","dependencies_parsed_at":"2023-09-07T17:45:33.655Z","dependency_job_id":null,"html_url":"https://github.com/RealTriassic/MySQL-Backup","commit_stats":null,"previous_names":["realtriassic/mysql-backup"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RealTriassic/MySQL-Backup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RealTriassic%2FMySQL-Backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RealTriassic%2FMySQL-Backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RealTriassic%2FMySQL-Backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RealTriassic%2FMySQL-Backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RealTriassic","download_url":"https://codeload.github.com/RealTriassic/MySQL-Backup/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RealTriassic%2FMySQL-Backup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32463892,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"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","backup-script","bash","mariadb","mysql","mysqldump-backup"],"created_at":"2024-11-12T18:15:06.601Z","updated_at":"2026-04-30T11:32:21.071Z","avatar_url":"https://github.com/RealTriassic.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MySQL-Backup\nA bash script to automatically dump, compress and store your MySQL/MariaDB database backups.\n\n# Configuration\n- `BACKUP_DIR` - The directory to be used for storing the database backups.\n- `MYSQL_USER` - MySQL username, typically you'd use the root user.\n- `MYSQL_PASSWORD` Password for your MySQL user, if user has no password, keep as empty string.\n- `BACKUPS_TO_KEEP` - Amount of backups to store before deleting the oldest one.\n\nOnce configured, I recommend running the script at least once manually and see if backups are created successfully.\n\n## Making it run automatically\nYou can use a simple cronjob to make it execute the script automatically.\n\n⚠️ **This is an example**, you may have to edit the cronjob if you have renamed/relocated the script.\n\n1. Run `crontab -e` to open the cronjob editor.\n2. Press `i` to enable insert mode in the editor.\n3. Paste this into a new line: `0 0 * * * bash /root/backup.sh \u003e\u003e /dev/null 2\u003e\u00261`\n4. Press ESC (Escape) on your keyboard.\n5. Type `:wq` to save and exit.\n\n\u003e This is going to create a new backup of all databases every 24 hours at midnight, but you can adjust the cronjob as you wish to have it run whenever you want.\n\n# License\nThis project is licensed under the Unlicense License, you may view the LICENSE [here](https://github.com/RealTriassic/MySQL-Backup/blob/main/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealtriassic%2Fmysql-backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frealtriassic%2Fmysql-backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealtriassic%2Fmysql-backup/lists"}