#!/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 final_path=$(ynh_app_setting_get $app final_path) domain=$(ynh_app_setting_get $app domain) db_name=$(ynh_app_setting_get $app db_name) #================================================= # STANDARD BACKUP STEPS #================================================= # BACKUP THE APP MAIN DIR ynh_backup "$final_path" # Backup user data ynh_backup "$gollem_data_dir" "user_data" 1 # BACKUP THE NGINX CONFIGURATION ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" # BACKUP THE PHP-FPM CONFIGURATION ynh_backup "/etc/php5/fpm/pool.d/$app.conf" ynh_backup "/etc/php5/fpm/conf.d/20-$app.ini" # BACKUP THE MYSQL DATABASE ynh_mysql_dump_db "$db_name" > db.sql