mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
Merge pull request #72 from YunoHost-Apps/fix_restore
Fix restore with backup_core_only
This commit is contained in:
commit
e222d25f8e
1 changed files with 6 additions and 2 deletions
|
@ -102,12 +102,16 @@ ynh_restore_file "/etc/logrotate.d/$app"
|
||||||
# RESTORE THE DATA DIRECTORY
|
# RESTORE THE DATA DIRECTORY
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
datadir="/home/yunohost.app/${app}/data"
|
||||||
|
|
||||||
# The data directory will be restored only if it exists in the backup archive
|
# The data directory will be restored only if it exists in the backup archive
|
||||||
# So only if it was backup previously.
|
# So only if it was backup previously.
|
||||||
if [ -d "$YNH_BACKUP_DIR/data" ]
|
if [ -d "$YNH_BACKUP_DIR/apps/$app/backup/home/yunohost.app/$app" ]
|
||||||
then
|
then
|
||||||
datadir="/home/yunohost.app/${app}/data"
|
|
||||||
ynh_restore_file "$datadir"
|
ynh_restore_file "$datadir"
|
||||||
|
else
|
||||||
|
# Create app folders
|
||||||
|
mkdir -p "$datadir"
|
||||||
fi
|
fi
|
||||||
# Remove the option backup_core_only if it's in the settings.yml file
|
# Remove the option backup_core_only if it's in the settings.yml file
|
||||||
ynh_app_setting_delete $app backup_core_only
|
ynh_app_setting_delete $app backup_core_only
|
||||||
|
|
Loading…
Add table
Reference in a new issue