mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-26 17:36:53 +00:00
Merge pull request #92 from nextcloud/fix/noid/borgbackup-fix-restore
fix the restore process
This commit is contained in:
commit
892590275f
1 changed files with 5 additions and 2 deletions
|
|
@ -183,8 +183,8 @@ if [ "$BORG_MODE" = restore ]; then
|
||||||
fi
|
fi
|
||||||
if ! rsync --stats --archive --human-readable -vv --delete \
|
if ! rsync --stats --archive --human-readable -vv --delete \
|
||||||
--exclude "nextcloud_aio_mastercontainer/data/backup_archives.list" \
|
--exclude "nextcloud_aio_mastercontainer/data/backup_archives.list" \
|
||||||
--exclude "nextcloud_aio_mastercontainer/data/session/"** \
|
--exclude "nextcloud_aio_mastercontainer/session/"** \
|
||||||
--exclude "nextcloud_aio_mastercontainer/data/certs/"** \
|
--exclude "nextcloud_aio_mastercontainer/certs/"** \
|
||||||
/tmp/borg/nextcloud_aio_volumes/ /nextcloud_aio_volumes; then
|
/tmp/borg/nextcloud_aio_volumes/ /nextcloud_aio_volumes; then
|
||||||
echo "Something failed while restoring the boot partition."
|
echo "Something failed while restoring the boot partition."
|
||||||
umount /tmp/borg
|
umount /tmp/borg
|
||||||
|
|
@ -202,6 +202,9 @@ if [ "$BORG_MODE" = restore ]; then
|
||||||
touch "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/skip.update"
|
touch "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/skip.update"
|
||||||
chmod 777 "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/skip.update"
|
chmod 777 "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/skip.update"
|
||||||
|
|
||||||
|
# Set backup-mode to restore since it was a restore
|
||||||
|
sed -i 's/"backup-mode":"[a-z]\+"/"backup-mode":"restore"/g' /nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue