4.3 KiB
4.3 KiB
Quick Validation Guide - Backup Persistence Fix
🚦 Quick Test - 5 Minutes
Step 1: Create Test Backup
# Run a manual backup
bash /home/litespeed/mb-backups/backup_all.sh manual
# Save snapshot list
bash /home/litespeed/mb-backups/view_snapshots.sh all > /tmp/before_uninstall.txt
cat /tmp/before_uninstall.txt
Step 2: Verify Password Locations
# Both should exist and be identical
cat /etc/restic-password
cat /data/.restic-password
# Verify they match
diff /etc/restic-password /data/.restic-password
# (No output = identical ✅)
Step 3: Uninstall Addon
- Go to Add-ons in Jelastic/Virtuozzo dashboard
- Find "MightyBox WordPress Backup/Restore Addon"
- Click Uninstall
- Confirm uninstallation
Step 4: Verify Data Persists
# Password should still exist in shared storage
ls -la /data/.restic-password
# Should show: -rw------- 1 root root 16 [date] /data/.restic-password
# Repository structure should exist
ls -la /data/
# Should show: config, data, index, keys, locks, snapshots directories
Step 5: Reinstall Addon
- Go to Add-ons in Jelastic/Virtuozzo dashboard
- Install "MightyBox WordPress Backup/Restore Addon"
- Wait for installation to complete
Step 6: Verify Backups Restored
# List all snapshots
bash /home/litespeed/mb-backups/view_snapshots.sh all > /tmp/after_reinstall.txt
# Compare before and after
diff /tmp/before_uninstall.txt /tmp/after_reinstall.txt
# ✅ SUCCESS if: No differences (all snapshots preserved)
# ❌ FAILURE if: Snapshots missing or "wrong password" errors
✅ Success Indicators
| Check | Expected Result | Command |
|---|---|---|
| Password in shared storage | File exists | ls /data/.restic-password |
| Password restored | Files identical | diff /etc/restic-password /data/.restic-password |
| Repository accessible | No errors | export RESTIC_PASSWORD=$(cat /etc/restic-password); restic -r /data snapshots |
| Snapshots preserved | Same count before/after | Compare snapshot lists |
| Can restore | Restoration works | bash restore_backup_direct.sh <snapshot_id> |
🔍 Troubleshooting
Issue: "Wrong password" error after reinstall
# Fix: Restore password from shared storage
cp /data/.restic-password /etc/restic-password
chmod 644 /etc/restic-password
# Verify access
export RESTIC_PASSWORD=$(cat /etc/restic-password)
restic -r /data snapshots
Issue: No snapshots visible after reinstall
# Check if repository exists
ls -la /data/ | grep -E "config|data|index|keys"
# Check password
cat /etc/restic-password /data/.restic-password
# Manual repository check
export RESTIC_PASSWORD=$(cat /data/.restic-password)
restic -r /data snapshots
Issue: /data not accessible
# Verify mount
mount | grep /data
df -h /data
# Check permissions
ls -ld /data
# Should be: drwxr-xr-x or similar
# Fix permissions if needed
chmod 755 /data
📊 Installation Logs to Check
During reinstall, you should see these messages:
[VALIDATION] Checking storage mount at /data...
[VALIDATION] Storage mount validated successfully
[VALIDATION] /data is accessible and writable
[INSTALL] Starting Restic installation...
[INSTALL] Using existing password from shared storage ← KEY MESSAGE
[INSTALL] Password restored from shared storage ← KEY MESSAGE
[INSTALL] Repository already exists and is accessible ← KEY MESSAGE
[INSTALL] Found X existing snapshot(s) ← KEY MESSAGE
[INSTALL] Installation completed successfully!
❌ Bad signs:
- "Creating new password" (should use existing)
- "Initializing new repository" (should use existing)
- "Found 0 existing snapshot(s)" (should show your snapshots)
🎯 One-Line Verification
# Run this after reinstall - should show your old backups
export RESTIC_PASSWORD=$(cat /data/.restic-password) && restic -r /data snapshots && echo "✅ SUCCESS: Backups preserved!"
📞 Report Issues
If validation fails, collect this information:
# Diagnostic Info
echo "=== Password Check ==="
ls -la /etc/restic-password /data/.restic-password
echo "=== Repository Structure ==="
ls -la /data/
echo "=== Snapshot Access ==="
export RESTIC_PASSWORD=$(cat /data/.restic-password)
restic -r /data snapshots 2>&1
echo "=== Installation Logs ==="
tail -50 /var/log/backup_addon.log
Save output and report to support team.