{"id":18779900,"url":"https://github.com/lhajman/backup","last_synced_at":"2025-12-18T14:30:23.978Z","repository":{"id":233542554,"uuid":"784535823","full_name":"tal7aouy/backup","owner":"tal7aouy","description":"Flexible and secure way to backup server data and databases, with features including encryption, logging, and customizable backup sources and destinations.","archived":false,"fork":false,"pushed_at":"2024-04-16T17:59:05.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-29T10:41:50.431Z","etag":null,"topics":["backup","database","sever"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/tal7aouy.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-04-10T03:22:49.000Z","updated_at":"2024-04-16T12:54:09.000Z","dependencies_parsed_at":"2024-11-07T20:24:16.136Z","dependency_job_id":"2ea47f8a-8351-4a66-b840-2d36110f1c53","html_url":"https://github.com/tal7aouy/backup","commit_stats":null,"previous_names":["tal7aouy/backup"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tal7aouy%2Fbackup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tal7aouy%2Fbackup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tal7aouy%2Fbackup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tal7aouy%2Fbackup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tal7aouy","download_url":"https://codeload.github.com/tal7aouy/backup/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239694625,"owners_count":19681902,"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","sever"],"created_at":"2024-11-07T20:23:41.834Z","updated_at":"2025-12-18T14:30:18.670Z","avatar_url":"https://github.com/tal7aouy.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Backup\n\nThis Bash script provides a robust solution for backing up server directories and a MySQL database. It reads configuration settings from an external file (`backup.conf`), performs the backups, logs the process, and securely encrypts the backup files.\n\n## Prerequisites\n\nBefore you begin, ensure you have the following installed and configured on your system:\n- **Bash Shell**: Available on Linux and UNIX-like operating systems.\n- **MySQL Server**: Needed for database backups.\n- **OpenSSL**: Required for encrypting the backup files.\n- **tar**: Utility for archiving directories.\n- **Access Permissions**: Ensure the script has the necessary permissions to access the directories and databases you intend to back up.\n\n## Configuration\n\nSet up your backup configuration by editing the `backup.conf` file. Adjust the file paths, database credentials, and other settings according to your specific needs.\n\n### Configuration File Template\n\n```ini\n# Database settings\nDB_USER=root\nDB_PASSWORD=password\nDB_NAME=my_database\n\n# Backup settings\nENCRYPTION_PASSWORD=my_secure_password\nBACKUP_ROOT_DIR=/path/to/backup\nSOURCE_DIRS=/home/user/data,/home/user/docs\n\n# Log file location\nLOG_FILE=/path/to/backup.log\n```\n\n## Installation\n\n1. **Download the Script**: Clone this repository or directly download the `backup.sh` and `backup.conf` files to your server.\n\n2. **Set File Permissions**: Secure the script and configuration file:\n   ```bash\n   chmod 700 backup.sh\n   chmod 600 backup.conf\n   ```\n\n3. **Configure the `backup.conf` File**: Ensure the configuration file is placed either in the same directory as `backup.sh` or specify its location in the script.\n\n## Usage\n\nExecute the script with the following command:\n\n```bash\n./backup.sh\n```\n\n### Automate with Cron\n\nTo automate the backup process, add a cron job:\n\n```bash\ncrontab -e\n```\n\nInsert the following line to run the backup daily at 2 AM:\n\n```cron\n0 2 * * * /path/to/backup.sh \u003e /dev/null 2\u003e\u00261\n```\n\n## Security Considerations\n\n- **Protect Sensitive Data**: Ensure the `backup.conf` is kept secure, as it contains sensitive information.\n- **Restrict Access**: Limit access to the script, configuration file, and backup data to trusted users only.\n- **Regular Testing**: Frequently test the backup and restore process to confirm the integrity and recoverability of the data.\n\n## Monitoring and Logs\n\nMonitor the backup process through the log file specified in `backup.conf`. Check this file regularly for any errors or confirmations of successful backups:\n\n```bash\ncat /path/to/backup.log\n```\n\n## Support\n\nFor any issues, suggestions, or contributions, please contact the repository maintainer or submit an issue/pull request to the project's GitHub page.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flhajman%2Fbackup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flhajman%2Fbackup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flhajman%2Fbackup/lists"}