#!/bin/bash #================================================= # GENERIC START #================================================= # Source YunoHost helpers source /usr/share/yunohost/helpers # Stop script if errors ynh_abort_if_errors # Import common cmd source ../settings/scripts/experimental_helper.sh source ../settings/scripts/_common.sh domain=$(ynh_app_setting_get $app domain) db_name=$(ynh_app_setting_get $app db_name) #================================================= # STANDARD BACKUP STEPS #================================================= # BACKUP THE NGINX CONFIGURATION ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" # Backup SOGo config ynh_backup "/etc/$app" # Backup stunnel config ynh_backup "/etc/stunnel/$app.conf" # Backup Logs ynh_backup "/var/log/$app" # Backup Cron ynh_backup "/etc/cron.d/$app" # BACKUP THE MYSQL DATABASE ynh_mysql_dump_db "$db_name" > db.sql