mirror of
https://github.com/YunoHost-Apps/seafile_ynh.git
synced 2024-09-03 20:26:01 +02:00
37 lines
No EOL
1,012 B
Bash
37 lines
No EOL
1,012 B
Bash
#!/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 |