Backup Verification
Comprehensive backup verification tool for ensuring backup integrity and data consistency.
Backup Verification Tool
A robust backup verification tool that ensures the integrity and consistency of system backups through comprehensive validation and testing.
Features
Verification Methods
- Checksum verification
- File integrity checking
- Data consistency validation
- Metadata verification
- Cross-backup comparison
Testing Capabilities
- Test restore simulation
- Data structure validation
- Permission verification
- Link integrity checking
- Archive validation
Reporting
- Detailed verification reports
- Integrity statistics
- Error tracking
- Performance metrics
- Custom report formats
Installation
Prerequisites
- Bash shell
- Python 3 (for reporting)
- jq (for JSON processing)
- yq (for YAML processing)
Installation Steps
Download the script from the Lambda Softworks Customer Portal:
- Log in to your Lambda Softworks Customer Portal account
- Navigate to the Files section
- Download the backup-verify.sh script
Make the script executable:
chmod +x backup-verify.sh
- Install dependencies:
# For Debian/Ubuntu sudo apt-get update sudo apt-get install -y python3 jq yq # For RHEL/CentOS sudo yum install -y python3 jq yq
Usage
Basic Commands
- Verify backup:
./backup-verify.sh --verify /path/to/backup
- Test restore:
./backup-verify.sh --test-restore /path/to/backup
- Generate report:
./backup-verify.sh --report /path/to/backup
Command-Line Options
--verify PATH
: Verify backup integrity--test-restore PATH
: Test backup restoration--report PATH
: Generate verification report--checksum
: Perform checksum verification--file FILE
: Backup file to verify--latest
: Verify the most recent backup--verbose
: Enable verbose output--integrity-check
: Perform integrity check--cloud
: Verify cloud backup--storage-type TYPE
: Cloud storage type--region REGION
: Cloud region--container CONTAINER
: Cloud container name--sas-token TOKEN
: Azure SAS token--account-name NAME
: Cloud account name--account-key KEY
: Cloud account key--endpoint URL
: Custom endpoint URL--nfs-server SERVER
: NFS server address--nfs-share SHARE
: NFS share path--config FILE
: Custom configuration file--log-level LEVEL
: Set log level (debug, info, warn, error)--help
: Show help message
Configuration
Configuration File
Location: $HOME/.backup-config.yml
Verification Settings
# Example verify-config.yml verification: checksum: true metadata: true permissions: true links: true compression: true encryption: true testing: restore_path: "/tmp/test_restore" compare: true validate_structure: true
Logs and Data Storage
Log Files
- Main log:
$HOME/.backup-verify.log
Temporary Storage
- Test directory:
/tmp/backup-verify-temp
System Support
Supported Operating Systems
- macOS (via Homebrew)
- Debian/Ubuntu (via apt-get)
- RHEL/CentOS (via yum)
- DNF-based systems (via dnf)
Examples
Verify Backup
# Verify backup integrity ./backup-verify.sh --verify /backup/daily_20240101.tar.gz # Generate detailed report ./backup-verify.sh --report /backup/daily_20240101.tar.gz
Test Restore
# Test backup restoration ./backup-verify.sh --test-restore /backup/daily_20240101.tar.gz # View verification logs tail -f /var/log/lambdasoftworks/verifications/daily_20240101.log
Troubleshooting
Common Issues
Verification Failures
- Check backup integrity
- Verify file permissions
- Review checksum errors
- Check disk space
Restore Test Issues
- Verify restore path permissions
- Check available space
- Review restore logs
- Validate backup format
Reporting Issues
- Check log directory permissions
- Verify report template access
- Check disk space
Debug Mode
To enable debug logging:
DEBUG=1 ./backup-verify.sh [OPTIONS]