Backify 🗃️ =========== What is Backify? 👾 ------------------- Backify is a shell script that helps you automate the backup process of all kinds of data from Linux systems. It differs from other backup scripts because it gives you the flexibility to choose what you want to save, ranging from system logs to containers. The script was tailored to meet personal needs as there was no complete solution for the specific use case. Prerequisites 👷 ------------------- - The script must be executed as root. - A configuration file named `backup.cfg` must exist in the same directory as the script. - The system must be either a Red Hat-based or an Ubuntu-based distribution. Configuration 🧙‍♂️ ------------------- All configuration options can be found in the `backup.cfg` file. The script has an integrity check in place to ensure that no external commands can be embedded into it by malware. The following table provides an overview of the available configuration options: | Name | Value | Specifics | | --- | --- | --- | | enabled | true/false | Disable the main function | | backup_path | ------> | Set where to save the backup | | www_backup | true/false | Backup of the webroot directory | | www_dir | ------> | Path to the webroot | | vhost_backup | true/false | Backup of the vhost configuration | | vhost_dir | ------> | Path to the vhost files | | log_backup | true/false | Backup log files | | log_backup_web | true/false | Backup web app logs | | apache | true/false | Enable Apache logs | | nginx | true/false | Enable nginx logs | | fail2ban_log | true/false | Enable fail2ban logs | | log_purge | true/false | Truncate logs after backup | | rsync_push | true/false | Push the backup file to a remote server | | push_clean | true/false | Delete the backup file after push | | target_host | ------> | Backup push target host | | target_user | ------> | Backup push target username | | target_key | ------> | Backup target ssh key | | target_dir | ------> | Backup target push to location | | docker_enable | true/false | Enable Docker backups | | docker_images | true/false | Backup Docker images | | docker_volumes | true/false | Backup Docker volumes | | docker_data | true/false | Backup container information | | db_backup | true/false | Backup database | | database_type | mysql/postgresql | Database type | | db_username | ------> | Username for DB access | | db_password | ------> | Password for DB access | | db_name | ------> | Name of database | | db_all | ------> | Dump all databases instead of specific one |