1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/synapse_ynh.git synced 2024-09-03 20:26:38 +02:00

Solve Backup / restore Issue

This commit is contained in:
Josué Tille 2017-10-21 01:31:04 +02:00
parent 1cace29da5
commit ba4cadcb04
3 changed files with 14 additions and 4 deletions

3
.gitignore vendored
View file

@ -2,3 +2,6 @@
.kateproject
.kateproject.d
.directory
*swp

View file

@ -12,6 +12,7 @@ source ../settings/scripts/psql.sh
# Retrieve arguments
domain=$(ynh_app_setting_get $app special_domain)
final_path="/opt/yunohost/matrix-synapse"
# Copy Nginx config
ynh_backup "/etc/nginx/conf.d/${domain}.d/${app}.conf" "nginx.conf"
@ -32,6 +33,12 @@ sudo su -c "pg_dump $synapse_db_name" postgres > ${YNH_CWD}/dump.sql
# Copie la configuration de logrotate
ynh_backup "/etc/logrotate.d/$app" "logrotate"
# Copy the logs
ynh_backup "/var/log/matrix-synapse" "log"
# Backup systemd service
ynh_backup "/etc/default/matrix-synapse"
ynh_backup "/etc/systemd/system/matrix-synapse.service"
ynh_backup "/etc/systemd/system/matrix-synapse.service"
# Backup synapse binary
ynh_backup "$final_path" "bin"

View file

@ -37,12 +37,12 @@ install_dependances
# Create user
ynh_system_user_create $synapse_user /var/lib/matrix-synapse
# Create directory Install synapse in virtualenv
install_from_source
# Restore all config and data
ynh_restore
# Open access to server without a button the home
python $final_path/add_sso_conf.py
# Configure access for certificates
set_certificat_access