mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-09-06 14:44:58 +08:00
also restore configuration.json even if the former restore failed
Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
parent
feffba739a
commit
6787d322cc
1 changed files with 6 additions and 4 deletions
|
@ -272,9 +272,8 @@ if [ "$BORG_MODE" = restore ]; then
|
|||
--exclude "nextcloud_aio_mastercontainer/data/session_date_file" \
|
||||
--exclude "nextcloud_aio_mastercontainer/session/"** \
|
||||
/tmp/borg/nextcloud_aio_volumes/ /nextcloud_aio_volumes; then
|
||||
RESTORE_FAILED=1
|
||||
echo "Something failed while restoring from backup."
|
||||
umount /tmp/borg
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Save current aio password
|
||||
|
@ -294,9 +293,8 @@ if [ "$BORG_MODE" = restore ]; then
|
|||
if ! rsync --archive --human-readable -vv \
|
||||
/tmp/borg/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json \
|
||||
/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json; then
|
||||
RESTORE_FAILED=1
|
||||
echo "Something failed while restoring the configuration.json."
|
||||
umount /tmp/borg
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Set backup-mode to restore since it was a restore
|
||||
|
@ -331,6 +329,10 @@ if [ "$BORG_MODE" = restore ]; then
|
|||
|
||||
umount /tmp/borg
|
||||
|
||||
if [ "$RESTORE_FAILED" = 1 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Inform user
|
||||
get_expiration_time
|
||||
echo "Restore finished successfully on $END_DATE_READABLE ($DURATION_READABLE)"
|
||||
|
|
Loading…
Add table
Reference in a new issue