Remove BlueMap data from backups

This commit is contained in:
2026-01-31 00:36:37 +00:00
parent 78f3609594
commit ebf6b0d934
2 changed files with 0 additions and 43 deletions

View File

@@ -21,7 +21,6 @@ Commands:
Restore options:
--all
--bluemap
--fabric
--fabric-essentials
--fabric-g4mespeed
@@ -59,8 +58,6 @@ cmd_restore() {
CLEANUP_VOLUMES=0
# Default flags
## Bluemap
RESTORE_BLUEMAP=0
## Fabric server
RESTORE_FABRIC_ESSENTIALS=0
RESTORE_FABRIC_G4MESPEED=0
@@ -86,7 +83,6 @@ cmd_restore() {
while [ $# -gt 0 ]; do
case "$1" in
--all)
RESTORE_BLUEMAP=1
RESTORE_FABRIC_ESSENTIALS=1
RESTORE_FABRIC_G4MESPEED=1
RESTORE_FABRIC_WORLD=1
@@ -103,10 +99,6 @@ cmd_restore() {
RESTORE_VELOCITY_DCLINK=1
;;
--bluemap)
RESTORE_BLUEMAP=1
;;
--fabric)
RESTORE_FABRIC_ESSENTIALS=1
RESTORE_FABRIC_G4MESPEED=1
@@ -235,7 +227,6 @@ cmd_restore() {
BACKUP_ID=$(basename "$BACKUP_DIR")
# Validate options
if [ "$RESTORE_BLUEMAP" -eq 0 ] \
&& [ "$RESTORE_FABRIC_ESSENTIALS" -eq 0 ] \
&& [ "$RESTORE_FABRIC_G4MESPEED" -eq 0 ] \
&& [ "$RESTORE_FABRIC_WORLD" -eq 0 ] \
@@ -263,7 +254,6 @@ cmd_restore() {
trap restore_cleanup_trap HUP INT QUIT ABRT TERM
create_snapshot || restore_cleanup_failure
restore_bluemap || restore_cleanup_failure
restore_fabric || restore_cleanup_failure
restore_luckperms || restore_cleanup_failure
restore_paper || restore_cleanup_failure
@@ -281,9 +271,6 @@ create_snapshot() {
# Map: source volume name -> cloned volume name
# Source names must match the mount points inside init
declare -Ag VOLUMES=(
[bluemap_data]="bluemap_data_$BACKUP_ID"
[bluemap_maps]="bluemap_maps_$BACKUP_ID"
[bluemap_web]="bluemap_web_$BACKUP_ID"
[fabric_data]="fabric_data_$BACKUP_ID"
[luckperms_data]="luckperms_data_$BACKUP_ID"
[paper_data]="paper_data_$BACKUP_ID"
@@ -308,9 +295,6 @@ create_snapshot() {
"${MOUNTS[@]}" \
init sh -ec '
for DIR in \
bluemap_data \
bluemap_maps \
bluemap_web \
fabric_data \
luckperms_data \
paper_data \
@@ -328,17 +312,6 @@ create_snapshot() {
echo "Created snapshot successfully"
}
restore_bluemap() {
if [ "$RESTORE_BLUEMAP" -eq "1" ]; then
echo "Restoring BlueMap data..."
docker compose run --rm init sh -c '
cp -a --reflink=auto "$1"/bluemap_data/. /bluemap_data &&
cp -a --reflink=auto "$1"/bluemap_maps/. /bluemap_maps &&
cp -a --reflink=auto "$1"/bluemap_web/. /bluemap_web
' -- "$BACKUP_DIR" || return 1
fi
}
restore_fabric() {
if [ "$RESTORE_FABRIC_ESSENTIALS" -eq 1 ]; then
echo "Restoring Fabric server's Essentials mod data..."
@@ -492,9 +465,6 @@ restore_cleanup() {
"${MOUNTS[@]}" \
init sh -ec '
for DIR in \
bluemap_data \
bluemap_maps \
bluemap_web \
fabric_data \
luckperms_data \
paper_data \