mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-11-10 22:20:41 +08:00
also save and restore daily backup time upon restore
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
b22c239998
commit
c29839f65f
1 changed files with 12 additions and 0 deletions
|
|
@ -230,6 +230,11 @@ if [ "$BORG_MODE" = restore ]; then
|
||||||
ADDITIONAL_BACKUP_DIRECTORIES="$(cat /nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/additional_backup_directories)"
|
ADDITIONAL_BACKUP_DIRECTORIES="$(cat /nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/additional_backup_directories)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Save daily backup time
|
||||||
|
if [ -f "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/daily_backup_time" ]; then
|
||||||
|
DAILY_BACKUPTIME="$(cat /nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/daily_backup_time)"
|
||||||
|
fi
|
||||||
|
|
||||||
# Restore everything except the configuration file
|
# Restore everything except the configuration file
|
||||||
if ! rsync --stats --archive --human-readable -vv --delete \
|
if ! rsync --stats --archive --human-readable -vv --delete \
|
||||||
--exclude "nextcloud_aio_mastercontainer/session/"** \
|
--exclude "nextcloud_aio_mastercontainer/session/"** \
|
||||||
|
|
@ -287,6 +292,13 @@ if [ "$BORG_MODE" = restore ]; then
|
||||||
chmod 770 "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/additional_backup_directories"
|
chmod 770 "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/additional_backup_directories"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Reset the additional backup directories
|
||||||
|
if [ -n "$DAILY_BACKUPTIME" ]; then
|
||||||
|
echo "$DAILY_BACKUPTIME" > "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/daily_backup_time"
|
||||||
|
chown 33:0 "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/daily_backup_time"
|
||||||
|
chmod 770 "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/daily_backup_time"
|
||||||
|
fi
|
||||||
|
|
||||||
umount /tmp/borg
|
umount /tmp/borg
|
||||||
|
|
||||||
# Inform user
|
# Inform user
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue