mirror of
https://github.com/YunoHost-Apps/mattermost_ynh.git
synced 2024-09-03 19:36:29 +02:00
parent
c984358fdd
commit
ac0637da3f
2 changed files with 13 additions and 0 deletions
|
@ -20,6 +20,7 @@ ynh_abort_if_errors
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
final_path="/var/www/$app"
|
final_path="/var/www/$app"
|
||||||
|
data_path="/home/yunohost.app/$app"
|
||||||
domain=$(ynh_app_setting_get $app domain)
|
domain=$(ynh_app_setting_get $app domain)
|
||||||
db_name="$app"
|
db_name="$app"
|
||||||
default_backup_dir="${1}apps/$app"
|
default_backup_dir="${1}apps/$app"
|
||||||
|
@ -33,6 +34,12 @@ backup_dir=${backup_dir:-"$default_backup_dir"}
|
||||||
|
|
||||||
ynh_backup "$final_path" "${backup_dir}$final_path"
|
ynh_backup "$final_path" "${backup_dir}$final_path"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# BACKUP THE APP DATA
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
ynh_backup "$data_path" "${backup_dir}$data_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP THE DATABASE
|
# BACKUP THE DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -51,6 +51,12 @@ ynh_restore_file "/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
ynh_restore_file "$final_path"
|
ynh_restore_file "$final_path"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# RESTORE THE APP DATA
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
ynh_restore_file "$data_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE MYSQL DATABASE
|
# RESTORE THE MYSQL DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue