This document provides a comprehensive overview of the backup strategy implemented on the Proxmox server.
The Proxmox server has a scheduled backup job configured with the following parameters:
Parameter | Value | Description |
---|---|---|
ID | backup-72aecfcb-28da | Unique identifier for the backup job |
Mode | snapshot | Uses snapshots for consistent backups |
Compress | zstd | Uses zstd compression algorithm |
Storage | proxback | Destination storage for backups |
Schedule | 4:00 | Daily at 4:00 AM |
VMID | 100 | VM to backup (ubuntu) |
Mail notification | always | Always send email notifications |
Mail recipient | [email protected] | Email address for notifications |
Pruning | keep-last: 2 | Retain only the last 2 backups |
Post-backup script | /scripts/oldbacks.sh | Script executed after backup completion |
The backup storage (/mnt/proxback/dump
) currently contains the following backup files:
Filename | Date | Size | Notes |
---|---|---|---|
vzdump-qemu-100-2025_03_25-04_00_00.vma.zst | March 25, 2025 | 114.9 GB | Full VM backup |
vzdump-qemu-100-2025_03_26-04_00_05.vma.zst | March 26, 2025 | 115.3 GB | Full VM backup |
Backups are stored on a dedicated SSD device with the following characteristics:
Parameter | Value |
---|---|
Device | /dev/sda (SanDisk SDSSDHII480G) |
Size | 447.1 GB |
Filesystem | ext4 |
Mount point | /mnt/proxback |
Used space | 224.8 GB (48.82%) |
Available space | 212.2 GB |
The server employs a multi-layered retention strategy:
Proxmox Backup Configuration:
prune-backups
is set to {"keep-last":"2"}
Custom Cleanup Script (/scripts/oldbacks.sh
):
#!/bin/bash
# Correct backup directory for proxback
BACKUP_DIR="/mnt/proxback"
# Retention period (number of days to keep backups)
RETENTION_DAYS=3
# Ensure backup directory exists
if [ -d "$BACKUP_DIR" ]; then
echo "Deleting backups older than $RETENTION_DAYS days in $BACKUP_DIR"
# Find and delete backups older than retention period
find "$BACKUP_DIR" -type f -name "*.vma.zst" -mtime +$RETENTION_DAYS -exec rm -f {} \;
find "$BACKUP_DIR" -type f -name "*.log" -mtime +$RETENTION_DAYS -exec rm -f {} \;
echo "Old backups removed."
else
echo "Backup directory $BACKUP_DIR does not exist."
exit 1
fi
3. **Alternate Backup Script** (`/scripts/oldbacks_backup.sh`):
- This is an alternative script that targets the default backup location
- Removes only the oldest backup file found
- Currently not in active use based on crontab analysis
## Backup Process Details
### 1. VM Snapshot Creation
Before the backup process begins, Proxmox creates a snapshot of the VM to ensure data consistency during the backup.
### 2. Backup Creation
The backup process uses the following settings:
- **Compression**: zstd (good balance of speed and compression ratio)
- **Mode**: Snapshot-based backup
- **Format**: vma.zst (Proxmox VMA format with zstd compression)
### 3. Backup Storage
- Backups are stored on a separate physical drive to isolate them from system storage
- The current backup size is approximately 115GB per backup
- With the retention policy of 3 days, the maximum expected storage utilization is ~345GB
### 4. Post-Backup Processing
After a successful backup:
1. The post-backup script `/scripts/oldbacks.sh` runs
2. Email notification is sent to `[email protected]`
3. Old backups exceeding the retention period are automatically deleted
## Backup Security Considerations
1. **Physical Isolation**:
- Backups are stored on a separate physical drive
- If the system storage fails, backups remain accessible
2. **Retention Balance**:
- 3-day retention balances storage capacity with recovery needs
- With ~115GB per backup and 447GB total storage, this allows for safe storage without exhausting space
3. **Notification System**:
- Email notifications for every backup operation
- Allows for quick response to any backup failures
## Backup Strategy Assessment
### Strengths
1. **Regular Schedule**: Daily backups ensure a maximum data loss of 24 hours
2. **Dedicated Storage**: Separate physical device for backups enhances reliability
3. **Automated Retention**: Prevents backup storage from filling up
4. **Snapshot-based**: Ensures consistent backups of running VM
5. **Email Notifications**: Provides monitoring of backup success/failure
### Considerations for Improvement
1. **Off-site Backup**: Consider adding remote/off-site backup for disaster recovery
2. **Multiple VMs**: Current strategy only backs up VM 100 (ubuntu)
3. **Backup Testing**: Implement regular test restores to verify backup integrity
4. **Encryption**: Add encryption for backups containing sensitive data
5. **Backup Rotation**: Consider a more sophisticated rotation strategy (daily/weekly/monthly)
## Backup Size Trends
The current backups show minimal growth between consecutive backups:
- March 25: 114.9 GB
- March 26: 115.3 GB
- Growth rate: ~0.4 GB per day
At this growth rate, storage capacity planning should account for approximately 12GB of additional space per month if the VM usage patterns remain consistent.