Implement custom directory backup

This commit is contained in:
2023-02-22 19:42:00 +01:00
parent fa3ca3cf63
commit 472e490ea1
3 changed files with 22 additions and 6 deletions

View File

@@ -2,12 +2,12 @@
# --------------------------------------------------------
# Please double check Your settings
# --------------------------------------------------------
enabled=false #enable main function
backup_path='/opt/backify/' # location of backups
enabled=false #enable the script
backup_path='/opt/backify/' # where do you want backups saved
www_backup=false # backup wwwroot
www_dir='xyz' # wwwroot location
vhost_backup=false # backup vhost config
vhost_dir='/etc/httpd/sites-enabled' # vhost location
www_dir='xyz' # location of wwwroot to backup
vhost_backup=false # backup vhost configurations
vhost_dir='/etc/httpd/sites-enabled' # location of active vhost files
log_backup=false # backup logs
log_to_backup=("apache" "nginx" "fail2ban" "pckg_mngr" "auth" "dmesg" "dpkg" "letsencrypt" "php" "syslog" "purge")
# logs to backup, options: apache, nginx, fail2ban, pckg_mngr, auth, dmesg, dpkg, letsencrypt, php, syslog, purge (truncate all))
@@ -26,4 +26,6 @@ database_type=mysql #mysql or postgresql
db_username=user #database user
db_password=user #database password
db_all=false #dumps all databases if true
db_name=user #name of the database
db_name=user #name of the database
custom_backup=false #backup custom files or directories
custom_dirs=("/opt/example" "/var/log/script.log") #array of custom files and/or directories to backup