From 3c1412d33dab847a898508e2eaaa5b099f0b544a Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 2 Mar 2022 22:35:33 +0100 Subject: [PATCH] Fix backup/restore --- scripts/backup | 6 ++++++ scripts/restore | 11 +++++++++++ 2 files changed, 17 insertions(+) diff --git a/scripts/backup b/scripts/backup index cbbfa3c..4aaca4a 100755 --- a/scripts/backup +++ b/scripts/backup @@ -49,6 +49,12 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_backup --src_path="/etc/systemd/system/$app.service" +#================================================= +# BACKUP VARIOUS FILES +#================================================= + +ynh_backup --src_path="/etc/$app/" + #================================================= # BACKUP THE POSTGRESQL DATABASE #================================================= diff --git a/scripts/restore b/scripts/restore index 6ebb6b6..30b588a 100755 --- a/scripts/restore +++ b/scripts/restore @@ -75,6 +75,17 @@ ynh_psql_test_if_first_run ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name +#================================================= +# RESTORE VARIOUS FILES +#================================================= +ynh_script_progression --message="Restoring various files..." + +ynh_restore_file --origin_path="/etc/$app/" + +chmod 750 "/etc/openproject/" +chmod -R o-rwx "/etc/openproject/" +chown -R $app:$app "/etc/openproject/" + #================================================= # RESTORE SYSTEMD #=================================================