[pve] Weekly backup 2026-07-05 — 20 files changed, 228 insertions(+), 71 deletions(-)

This commit is contained in:
Proxmox Backup
2026-07-05 03:00:03 -05:00
parent fd7b7bc615
commit 0bf6bda39e
20 changed files with 228 additions and 71 deletions
+36
View File
@@ -0,0 +1,36 @@
#!/bin/bash
# Ensures the NAS CIFS mount and the MSP360 bind-mount are both live.
# MSP360's pre-flight check does `mountpoint <Path>` on the exact configured
# storage Path (/mnt/nas-backups/MSPBackups). Since that's a subdirectory of
# the real CIFS mount (/mnt/nas-backups), it never registers as a mountpoint
# on its own -- so we bind-mount it onto itself to make it one.
set -u
MOUNT=/mnt/nas-backups
SUBDIR="$MOUNT/MSPBackups"
LOG=/var/log/msp360-mount-ensure.log
log() { echo "$(date '+%F %T') $1" >> "$LOG"; }
if ! mountpoint -q "$MOUNT"; then
log "CIFS mount down, remounting $MOUNT..."
if mount "$MOUNT" 2>>"$LOG"; then
log "CIFS remount OK"
umount "$SUBDIR" 2>/dev/null || true
else
log "CIFS remount FAILED"
exit 1
fi
fi
if ! mountpoint -q "$SUBDIR"; then
log "Bind mount down, rebinding $SUBDIR..."
mkdir -p "$SUBDIR"
if mount --bind "$SUBDIR" "$SUBDIR" 2>>"$LOG"; then
log "Bind mount OK"
else
log "Bind mount FAILED"
exit 1
fi
fi
exit 0