How to Test Backup Works - Complete Guide
Question: How do I verify my backups are working?
Answer: Test restoration is essential
Method 1: Using Web UI
Step-by-Step:
1. Navigate to Storage
- Go to Datacenter → Storage → local
- Click Content
2. Verify Backup File
- Find your backup file
- Check file size (should be > 0)
3. Check Backup Log
- Go to Datacenter → Backup
- Look at job status (shows success/failed)
Method 2: Using CLI
Test Backup Integrity
# List backups
vzdump --list
# Verify backup file
tar -tzf /var/lib/vz/dump/vzdump-qemu-100-*.tar.gz | wc -l
# Check file size
ls -lh /var/lib/vz/dump/How to Test Restore (Test VM)
Test Restore Steps:
1. Create Test VM
# Create test VM for restore test
qm create 999 --name test-restore --memory 10242. Restore to Test VM
# Restore backup to test VM
qmrestore /var/lib/vz/dump/vzdump-*.tar.gz 9993. Verify Test VM
# Check test VM
qm config 999
# Start if needed
qm start 9994. Clean Up
# Destroy test VM
qm destroy 999 --destroy-unlinkedHow to Schedule Test Restore
Monthly Test Schedule
# Add to calendar - monthly first Sunday
# Manually schedule monthly testAutomation Script
#!/bin/bash
# test-restore.sh - Test restore monthly
TEST_VM=998
BACKUP_FILE=$(ls -t /var/lib/vz/dump/vzdump-qemu-100*.tar.gz | head -1)
echo "Testing backup: $BACKUP_FILE"
# Restore
qmrestore "$BACKUP_FILE" $TEST_VM
# Check VM
qm start $TEST_VM
# Wait and check
sleep 30
# Get VM status
if qm status $TEST_VM | grep -q running; then
echo "TEST PASSED: VM running"
else
echo "TEST FAILED: VM not running"
exit 1
fi
# Cleanup
qm stop $TEST_VM --forceStop 1
qm destroy $TEST_VM
echo "Test complete"Pro Tips
- Test monthly - At minimum quarterly
- Document test results
- Keep test VM template ready
Keywords
test restore verification how-to beginner