Configuration Backup (Automation)
Learning Focus
By the end of this lesson you will know how to set up automated configuration backups.
What to Backup
| Path | Contents |
|---|---|
/usr/local/lsws/conf/ | Server and vhost configuration |
/etc/ssl/private/ | SSL private keys |
/etc/ssl/certs/ | SSL certificates |
/usr/local/lsws/admin/conf/ | Admin credentials |
Automated Backup Script
See Backup Configuration for the complete backup script with cron scheduling.
Quick One-Liner
# Create a dated backup archive
sudo tar -czf /root/backups/ols-$(date +%Y%m%d).tar.gz \
/usr/local/lsws/conf/ /usr/local/lsws/admin/conf/ 2>/dev/null
Key Takeaways
- Automate backups with cron and shell scripts.
- Always backup before upgrades or major changes.
- Store backups off-server for disaster recovery.
What's Next
- Return to the Advanced Features module for the complete overview.