From 7accc9a6e6f5389d08250ec606345bb4b213c9fc Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Sun, 8 Jan 2017 21:37:51 +0100 Subject: [PATCH] backup_core_only restore --- scripts/restore | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index a88e502..2b285cc 100755 --- a/scripts/restore +++ b/scripts/restore @@ -55,7 +55,11 @@ sudo useradd -c "$app system account" \ # Restore the app files sudo cp -a ./www "$DESTDIR" sudo mkdir -p "$DATADIR" -sudo cp -a ./data/. "$DATADIR" +if [ -d ./data ] # Le dossier data est restauré seulement si il existe. Si le backup a été fait avec l'option backup_core_only, ce dossier n'a pas été sauvegardé. +then + sudo cp -a ./data/. "$DATADIR" +fi +ynh_app_setting_delete $app backup_core_only # Retire l'option backup_core_only du fichier settings.yml le cas échéant # Create and restore the database ynh_mysql_create_db "$dbname" "$dbuser" "$dbpass"