Backup Tools Overview
Comprehensive guide to Lambda Softworks' backup automation scripts for Linux systems.
The Backup Tools package provides enterprise-grade backup automation for Linux systems. Our scripts handle everything from scheduling to verification, with support for multiple storage destinations and encryption.
Main Scripts
1. backup-orchestrator.sh
The main backup management script:
# Interactive mode ./backup-orchestrator.sh # CLI mode examples ./backup-orchestrator.sh --source /var/www --dest s3://my-bucket ./backup-orchestrator.sh --config /etc/backup-config.yml
Options:
--source Source directory or files to backup --dest Destination (local path or cloud URL) --compress Compression method (gzip|bzip2|xz) --encrypt Enable encryption (requires GPG key) --schedule Cron schedule expression --retention Days to keep backups
2. backup-verify.sh
Verification and testing script:
# Test latest backup ./backup-verify.sh --latest # Verify specific backup ./backup-verify.sh --file backup-2024-01-01.tar.gz
3. cloud-sync.sh
Cloud storage integration:
# Configure cloud storage ./cloud-sync.sh --setup aws|gcp|azure # Manual sync ./cloud-sync.sh --sync-now /path/to/backups
Configuration
Example backup configuration:
# /etc/backup-config.yml sources: - path: /var/www exclude: - "*.tmp" - "cache/*" - path: /etc exclude: - "*.log" destinations: - type: local path: /mnt/backup-drive - type: s3 bucket: company-backups prefix: production/ schedule: full: "0 0 * * 0" # Weekly full backup incremental: "0 0 * * 1-6" # Daily incremental retention: full: 90 # days incremental: 14 # days encryption: enabled: true key_id: "backup@company.com" compression: method: gzip level: 6 notification: email: admin@company.com slack_webhook: https://hooks.slack.com/...
Common Use Cases
1. Website Backup
./backup-orchestrator.sh \ --source /var/www \ --source /etc/nginx \ --source /etc/letsencrypt \ --dest s3://backups/website \ --compress gzip \ --encrypt \ --schedule "0 3 * * *"
2. Database Backup
./backup-orchestrator.sh \ --type mysql \ --databases "prod_db,staging_db" \ --dest /mnt/backup-drive \ --compress xz \ --retention 30
3. Multi-Server Sync
./cloud-sync.sh \ --source-server web1.company.com:/backups \ --source-server web2.company.com:/backups \ --dest s3://central-backup \ --sync-schedule "*/15 * * * *"
Best Practices
Testing
- Always verify backups after creation
- Regularly test restore procedures
- Keep offline copies of critical data
Security
- Use strong encryption keys
- Rotate keys periodically
- Store keys securely and separately
Monitoring
- Set up email notifications
- Monitor backup sizes and timing
- Check verification results
Troubleshooting
Common issues and solutions:
Backup Fails
# Check logs ./backup-orchestrator.sh --check-logs # Test permissions ./backup-orchestrator.sh --test-permissions
Verification Errors
# Detailed verification ./backup-verify.sh --verbose --file backup.tar.gz
Cloud Sync Issues
# Test connectivity ./cloud-sync.sh --test-connection aws