Bash script for advanced server backup
Go to file
2023-02-11 11:50:38 +01:00
.gitignore Bug fixes / Git ignore for parsed backup.cfg 2023-02-10 21:44:40 +01:00
backup.cfg MySQL backup implementation 2023-02-11 11:49:22 +01:00
main.sh MySQL backup implementation 2023-02-11 11:49:22 +01:00
README.MD readme update 2023-02-11 11:50:38 +01:00

Backify 🗃️

A powerful and automated bash script for backing up all kinds of Linux data, archiving it and pushing it to a remote host.

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.

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
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
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

To-Do List

  • Rsync implementation via shell
  • Rsync implementation via Docker
  • Cron scheduler
  • RHEL/Ubuntu parser
  • Automatic adjustments per system
  • MySQL backups
  • PostgreSQL backups
  • Cover more system logs