From 975c8952c44d00a63e7602f83bbabbf961249170 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 13 Jun 2024 09:26:59 +0200 Subject: [PATCH] add data dir --- scripts/backup | 6 ++++++ scripts/restore | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/scripts/backup b/scripts/backup index 031dabc..15bda74 100755 --- a/scripts/backup +++ b/scripts/backup @@ -21,6 +21,12 @@ ynh_print_info --message="Declaring files to be backed up..." ynh_backup --src_path="$install_dir" +#================================================= +# BACKUP THE DATA DIR +#================================================= + +ynh_backup --src_path="$data_dir" --is_big + #================================================= # SYSTEM CONFIGURATION #================================================= diff --git a/scripts/restore b/scripts/restore index c9b4674..49c4964 100755 --- a/scripts/restore +++ b/scripts/restore @@ -19,6 +19,15 @@ ynh_restore_file --origin_path="$install_dir" chown -R $app:www-data "$install_dir" +#================================================= +# RESTORE THE DATA DIRECTORY +#================================================= +ynh_script_progression --message="Restoring the data directory..." --weight=1 + +ynh_restore_file --origin_path="$data_dir" --not_mandatory + +chown -R "$app:www-data" "$data_dir" + #================================================= # RESTORE THE PostgreSQL DATABASE #=================================================