From 88bde65e083de8d14d84b47c0373f616bcdad90d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 12 Oct 2023 17:48:44 +0200 Subject: [PATCH] cleaning --- scripts/backup | 7 +++++++ scripts/restore | 10 ++++++++++ 2 files changed, 17 insertions(+) diff --git a/scripts/backup b/scripts/backup index 8af0451..602cb5e 100755 --- a/scripts/backup +++ b/scripts/backup @@ -20,6 +20,13 @@ ynh_print_info --message="Declaring files to be backed up..." ynh_backup --src_path="$install_dir" +#================================================= +# BACKUP THE DATA DIR +#================================================= + +# Only relevant if there is a "data_dir" resource for this app +ynh_backup --src_path="$data_dir" --is_big + #================================================= # BACKUP THE NGINX CONFIGURATION #================================================= diff --git a/scripts/restore b/scripts/restore index 6e0a9ef..32d510c 100755 --- a/scripts/restore +++ b/scripts/restore @@ -20,6 +20,16 @@ ynh_restore_file --origin_path="$install_dir" chmod -R o-rwx "$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 + +# (Same as for install dir) +chown -R $app:www-data "$data_dir" + #================================================= # RESTORE THE MYSQL DATABASE #=================================================