add bookshelf module, fix gitea minor typo, add fixe ip for vms
This commit is contained in:
9
modules/apps/bookshelf/lib/scripts/restore-backup.sh
Normal file
9
modules/apps/bookshelf/lib/scripts/restore-backup.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
source /opt/bookshelf/env.sh
|
||||
|
||||
LATEST_BACKUP=$(ls -1 $BOOKSHELF_BACKUPS_DIR/$BOOKSHELF_BACKUP_PREFIX-*.sql 2>/dev/null | sort | tail -n1)
|
||||
|
||||
if [ -n "$LATEST_BACKUP" ] && [ -f "$LATEST_BACKUP" ]; then
|
||||
cat $LATEST_BACKUP | docker exec -i bookshelf-database-1 mariadb -u root -p"$MARIADB_ROOT_PASSWORD" -D $MARIADB_DATABASE
|
||||
fi
|
||||
Reference in New Issue
Block a user