Backup and Restore
Once you have set up Search Guard on a testing or staging environment, you might want to replicate the exact Search Guard configuration on your production cluster.
If you have the Search Guard configuration files at hand, you can of course simply use sgadmin to upload them to production.
If you’re unsure whether your configuration files actually resemble the active Search Guard configuration on your cluster, you can use sgadmin to retrieve the configuration from a running cluster, and upload it to another one:
Backup the current configuration from a cluster running on
./sgadmin.sh -backup /etc/sgbackup/ -h staging.example.com -ts ... -tspass ... -ks ... -kspass ...
To upload the dumped files to another cluster, here
production.example.com listening on port 9301, use:
./sgadmin.sh -h production.example.com -cd /etc/sgbackup/ -ts ... -tspass ... -ks ... -kspass ...