This guide focuses on backing up and restoring the assets managed by the Wazuh dashboard itself, ensuring you can recover your configuration, customizations, and saved objects in case of system failure or migration.
What to Back Up
The following assets should be included in your backup strategy:
Dashboard Configuration
- Main configuration file:
/etc/wazuh-dashboard/opensearch_dashboards.yml
- Contains server settings, API connections, and plugin configurations
- Critical for dashboard startup and connectivity
TLS Certificates
- Certificate directory:
/etc/wazuh-dashboard/certs/
- Includes SSL/TLS certificates and keys
- Required for secure communication with indexer and manager
- Contains:
dashboard.crt - Dashboard SSL certificate
dashboard.key - Dashboard SSL private key
root-ca.pem - Certificate Authority certificate
Saved Objects
- Dashboards
- Visualizations
- Index patterns
- Searches
- Custom queries
- Reports configurations
These are exported from the UI as .ndjson files.
Custom Branding Assets
- Custom images directory:
/usr/share/wazuh-dashboard/plugins/wazuh/public/assets/custom/images/
- Contains custom logos and branding elements (if used)
- Only needed if custom branding is configured
Additional Files to Consider
- Plugin configurations
- Custom scripts
- Integration configurations
- Documentation of custom settings
Backup Procedures
Manual Backup
1. Export Saved Objects
Export saved objects through the dashboard UI:
- Open Dashboard management > Dashboards Management > Saved objects.
- Export the required objects, or use Export all objects to export everything.
- Save the
.ndjson file to a secure location.
2. Backup Configuration Files
Create a timestamped backup of the configuration directory:
3. Backup Certificates
Create a separate backup of certificates:
4. Backup Custom Branding
If you have custom branding configured:
5. Document Custom Settings
Create a record of your configuration:
Automated Backup Script
Create a backup script for regular automated backups:
Make the script executable and schedule it with cron:
Export Saved Objects via API
Export saved objects programmatically:
Restore Procedures
Complete Restore
Restore the dashboard from a complete backup:
1. Install Wazuh Dashboard
Reinstall the Wazuh dashboard package on the target host:
Debian/Ubuntu:
RHEL/CentOS:
2. Stop the Dashboard Service
3. Restore Configuration Files
Restore the configuration directory:
4. Restore Certificates
5. Restore Custom Branding
If you have custom branding:
6. Set File Permissions
7. Start the Dashboard Service
8. Verify Service Status
9. Import Saved Objects
Restore saved objects through the UI:
- Access the dashboard at
https://<DASHBOARD_IP>/app/wz-home
- Navigate to Dashboard management > Dashboard Management > Saved objects
- Click Import
- Select your backed-up
.ndjson file
- Handle conflicts appropriately
- Click Import
Partial Restore
Restore Configuration Only
Restore Certificates Only
Import Specific Saved Objects
Import only specific types of saved objects:
Backup Best Practices
Backup Frequency
- Configuration files: Before any changes or upgrades
- Saved objects: Weekly or after significant customizations
- Certificates: Before renewal or changes
- Complete backups: Daily or weekly depending on change frequency
Backup Storage
Store backups in a secure location separate from the dashboard server to protect against hardware failure or data loss.
- Use remote storage (NAS, cloud storage, backup server)
- Encrypt sensitive backups (especially those containing certificates)
- Maintain multiple backup versions
- Test backup integrity regularly
- Document backup and restore procedures
Backup Retention
- Keep daily backups for 7 days
- Keep weekly backups for 4 weeks
- Keep monthly backups for 12 months
- Adjust retention based on compliance requirements
Security Considerations
- Secure backup storage with appropriate permissions
- Encrypt backups containing sensitive data
- Protect certificate private keys
- Limit access to backup files
- Audit backup access regularly
Disaster Recovery
Recovery Time Objective (RTO)
Expected time to restore dashboard functionality:
- Configuration restore: 10-15 minutes
- Complete restore: 30-60 minutes
- Includes service restart and verification
Recovery Point Objective (RPO)
Acceptable data loss window:
- Configuration changes: Based on backup frequency
- Saved objects: Last export timestamp
- Consider more frequent backups for critical environments
Disaster Recovery Testing
Regularly test your backup and restore procedures:
- Schedule periodic recovery tests
- Document test results
- Update procedures based on findings
- Train team members on restore procedures
- Maintain current documentation
Troubleshooting Restore Issues
Service Fails to Start After Restore
Solutions:
- Check configuration file syntax
- Verify certificate paths and permissions
- Review logs for specific errors
- Ensure indexer connectivity
- Verify file ownership and permissions
Saved Objects Import Fails
Solutions:
- Verify
.ndjson file integrity
- Check version compatibility
- Import in smaller batches
- Use overwrite option for conflicts
- Check for index pattern dependencies
Certificate Validation Errors
Solutions:
- Verify certificate files are complete
- Check certificate expiration dates
- Ensure correct certificate format
- Verify certificate chain is complete
- Check certificate permissions
Additional Resources
- Configuration reference: Review configuration options
- Security hardening: Protect backup data
- Upgrade procedures: Backup before upgrades
- Migration guide: Backup before major migrations