mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 06:26:57 +00: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/data/session_date_file" \
|
||||||
--exclude "nextcloud_aio_mastercontainer/session/"** \
|
--exclude "nextcloud_aio_mastercontainer/session/"** \
|
||||||
/tmp/borg/nextcloud_aio_volumes/ /nextcloud_aio_volumes; then
|
/tmp/borg/nextcloud_aio_volumes/ /nextcloud_aio_volumes; then
|
||||||
|
RESTORE_FAILED=1
|
||||||
echo "Something failed while restoring from backup."
|
echo "Something failed while restoring from backup."
|
||||||
umount /tmp/borg
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Save current aio password
|
# Save current aio password
|
||||||
|
|
@ -294,9 +293,8 @@ if [ "$BORG_MODE" = restore ]; then
|
||||||
if ! rsync --archive --human-readable -vv \
|
if ! rsync --archive --human-readable -vv \
|
||||||
/tmp/borg/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json \
|
/tmp/borg/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json \
|
||||||
/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json; then
|
/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json; then
|
||||||
|
RESTORE_FAILED=1
|
||||||
echo "Something failed while restoring the configuration.json."
|
echo "Something failed while restoring the configuration.json."
|
||||||
umount /tmp/borg
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set backup-mode to restore since it was a restore
|
# Set backup-mode to restore since it was a restore
|
||||||
|
|
@ -331,6 +329,10 @@ if [ "$BORG_MODE" = restore ]; then
|
||||||
|
|
||||||
umount /tmp/borg
|
umount /tmp/borg
|
||||||
|
|
||||||
|
if [ "$RESTORE_FAILED" = 1 ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Inform user
|
# Inform user
|
||||||
get_expiration_time
|
get_expiration_time
|
||||||
echo "Restore finished successfully on $END_DATE_READABLE ($DURATION_READABLE)"
|
echo "Restore finished successfully on $END_DATE_READABLE ($DURATION_READABLE)"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue