#!/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 # Set configuration for user and final path get_configuration # retrieve useful param domain=$(ynh_app_setting_get ${app} domain) db_pwd=$(ynh_app_setting_get ${app} mysqlpwd) #================================================= # STANDARD BACKUP STEPS #================================================= # # Backup app files ynh_backup $final_path ynh_backup /home/yunohost.app/seafile-data "data" 1 ynh_backup /etc/nginx/conf.d/$domain.d/${app}.conf ynh_backup /etc/init.d/seafile-server # Backup mysql ynh_mysql_dump_db ccnetdb > ${YNH_CWD}/ccnetdb.dmp ynh_mysql_dump_db seafiledb > ${YNH_CWD}/seafiledb.dmp ynh_mysql_dump_db seahubdb > ${YNH_CWD}/seahubdb.dmp