diff --git a/README.md b/README.md index de534d5..410294a 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,17 @@ To remove call e.g.: sudo yunohost app remove pyinventory ``` +Backup / remove / restore cycle, e.g.: +```bash +yunohost backup create --apps pyinventory +yunohost backup list +archives: + - pyinventory-pre-upgrade1 + - 20201223-163434 +yunohost app remove pyinventory +yunohost backup restore 20201223-163434 --apps pyinventory +``` + Debug installation, e.g.: ```bash root@yunohost:~# ls -la /var/www/pyinventory/ diff --git a/scripts/restore b/scripts/restore index b0f4dad..1302c03 100755 --- a/scripts/restore +++ b/scripts/restore @@ -70,7 +70,6 @@ ynh_system_user_create --username=$app --home_dir="$final_path" --use_shell #================================================= # Restore permissions on app files -chown -R "$app" "$log_path" chown -R "$app" "$public_path" chown -R "$app" "$final_path" @@ -111,7 +110,9 @@ yunohost service add $app --description="Web based management to catalog things" # RESTORE THE LOGROTATE CONFIGURATION #================================================= -mkdir -p "/var/log/$app" +mkdir -p "$log_path" +touch "${log_file}" +chown -R "$app" "$log_path" ynh_restore_file --origin_path="/etc/logrotate.d/$app" #=================================================