Skip to main content
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:
  1. Open Dashboard management > Dashboards Management > Saved objects.
  2. Export the required objects, or use Export all objects to export everything.
  3. 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:
  1. Access the dashboard at https://<DASHBOARD_IP>/app/wz-home
  2. Navigate to Dashboard management > Dashboard Management > Saved objects
  3. Click Import
  4. Select your backed-up .ndjson file
  5. Handle conflicts appropriately
  6. 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:
  1. Schedule periodic recovery tests
  2. Document test results
  3. Update procedures based on findings
  4. Train team members on restore procedures
  5. Maintain current documentation

Troubleshooting Restore Issues

Service Fails to Start After Restore

Solutions:
  1. Check configuration file syntax
  2. Verify certificate paths and permissions
  3. Review logs for specific errors
  4. Ensure indexer connectivity
  5. Verify file ownership and permissions

Saved Objects Import Fails

Solutions:
  1. Verify .ndjson file integrity
  2. Check version compatibility
  3. Import in smaller batches
  4. Use overwrite option for conflicts
  5. Check for index pattern dependencies

Certificate Validation Errors

Solutions:
  1. Verify certificate files are complete
  2. Check certificate expiration dates
  3. Ensure correct certificate format
  4. Verify certificate chain is complete
  5. 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