mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 14:36:52 +00:00
make the instance restore process better understandable
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
6037b4402b
commit
d288bdd023
7 changed files with 80 additions and 57 deletions
|
|
@ -1,7 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Variables
|
||||
export BORG_BACKUP_DIRECTORY="/mnt/borgbackup/borg"
|
||||
export MOUNT_DIR="/mnt/borgbackup"
|
||||
export BORG_BACKUP_DIRECTORY="$MOUNT_DIR/borg"
|
||||
|
||||
# Validate BORG_PASSWORD
|
||||
if [ -z "$BORG_PASSWORD" ] && [ -z "$BACKUP_RESTORE_PASSWORD" ]; then
|
||||
|
|
@ -35,7 +36,11 @@ fi
|
|||
rm -f "/nextcloud_aio_volumes/nextcloud_aio_database_dump/backup-is-running"
|
||||
|
||||
# Get a list of all available borg archives
|
||||
borg list "$BORG_BACKUP_DIRECTORY" | grep "nextcloud-aio" | awk -F " " '{print $1","$3,$4}' > "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/backup_archives.list"
|
||||
if borg list "$BORG_BACKUP_DIRECTORY" &>/dev/null; then
|
||||
borg list "$BORG_BACKUP_DIRECTORY" | grep "nextcloud-aio" | awk -F " " '{print $1","$3,$4}' > "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/backup_archives.list"
|
||||
else
|
||||
echo "" > "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/backup_archives.list"
|
||||
fi
|
||||
chmod +r "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/backup_archives.list"
|
||||
|
||||
if [ -n "$FAILED" ]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue