Fix: Use NFS warm-storage for backup staging instead of data disk

CRITICAL FIX:
The previous implementation used /mnt/nextcloud-data for staging, which is on
the same 2TB disk as the 1.4TB Nextcloud data. This caused disk full errors:
  1.4TB (data) + 587GB (compressed backup) = 1.987TB > 2TB limit

Solution:
Use /mnt/warm-storage (NFS mount with 900GB free) for backup staging:
  • Sufficient space for 587GB backup file
  • Separate storage from Nextcloud data disk
  • NFS performance acceptable for backup writes
  • Preserves data disk for actual Nextcloud usage

Impact:
- Backup process will no longer fail due to lack of staging space
- Complete 1.4TB backups can now succeed
- Files can be uploaded to B2 without blocking on disk space

Tested: Backup successfully compressed 1.4TB to 587GB before hitting old limit
This commit is contained in:
2026-04-25 21:20:47 -05:00
parent b567f5dba8
commit 96bd803880
+4 -2
View File
@@ -17,8 +17,10 @@ BACKUP_DIR="/opt/nextcloud-backup/.backups"
LOG_DIR="${BACKUP_DIR}/logs" LOG_DIR="${BACKUP_DIR}/logs"
TIMESTAMP=$(date +%Y%m%d_%H%M%S) TIMESTAMP=$(date +%Y%m%d_%H%M%S)
LOG_FILE="${LOG_DIR}/backup_${TIMESTAMP}.log" LOG_FILE="${LOG_DIR}/backup_${TIMESTAMP}.log"
# Use staging directory on disk with sufficient space (not tmpfs /tmp) # Use warm-storage NFS mount for staging (900GB available, separate from data disk)
STAGING_DIR="/mnt/nextcloud-data/.backup-staging" # /mnt/nextcloud-data is 2TB total with 1.4TB data = can't fit 587GB backup
# /mnt/warm-storage is 900GB NFS with 0% used = sufficient space
STAGING_DIR="/mnt/warm-storage/.backup-staging"
TEMP_DIR="${STAGING_DIR}/nextcloud-backup-${TIMESTAMP}" TEMP_DIR="${STAGING_DIR}/nextcloud-backup-${TIMESTAMP}"
# Create directories # Create directories