Please refer to the official Curator install guide on how to install it on various operating systems.
In order to create backups for Snow Owl, you need a repository in your Elasticsearch cluster.
To create a repository (assuming shared file system repository,
fs), execute the following command:
$ curl -XPUT localhost:9200/_snapshot/snowowl-snapshots -d
Elasticsearch requires that the specified
/path/to/shared/mountis whitelisted in the
path.repoconfiguration setting in the
elasticsearch.ymlconfiguration file. See section Shared file system repository of the Elasticsearch reference for details.
Curator requires a single configuration file to be specified when running it. If you are using a default Elasticsearch cluster with default configurations then the default Curator recommended file should be sufficient. Any configuration changes you have made to your Elasticsearch cluster needs to be changed here as well in this config file so Curator can access your cluster without any issues.
blacklist: ['elasticsearch', 'urllib3']
Curator is using action YML files to perform a set of actions sequentially. See the available steps here: https://www.elastic.co/guide/en/elasticsearch/client/curator/5.8/actions.html
A Snapshot Action that can be used to backup the content from a Snow Owl Terminology Server.
Snapshot all indices. Wait for the snapshot to complete. Do not skip
the repository filesystem access check.
- filtertype: none
Keep 10 most recent snapshots in the selected repository
(based on creation_date), for 'curator-' prefixed snapshots. Ordering
is age-based and reversed by default for the 'count' filter.
- filtertype: pattern
- filtertype: count
To execute a Snapshot action manually, you can use the following command:
$ curator --config curator.yml snowowl_snapshot.yml
A Restore Action that can be used to restore the latest snapshot (aka backup) to the Snow Owl Terminology Server.
Restore all indices in the most recent curator-* snapshot with state SUCCESS. Wait
for the restore to complete before continuing. Do not skip the repository
filesystem access check.
# If name is blank, the most recent snapshot by age will be selected
# If indices is blank, all indices in the snapshot will be restored
- filtertype: pattern
- filtertype: state
To execute a Restore action manually, you can use the following command:
$ curator --config curator.yml snowowl_restore.yml
To schedule automated backups, you can use Cron on Unix-style operating systems to automate the job. The back up interval depends on your use case and how you are accessing the data. If you have a write-heavy scenario, we recommend a hourly backup interval, otherwise some value between hourly - daily is preferable.
An example crontab entry that initiates a daily backup at 03:00, and captures Curator's output to
/var/log/backup.log(both standard output and standard error) would look like this:
0 3 * * * /path/to/curator --config /path/to/snowowl/configs/curator.yml /path/to/snowowl/configs/curator/snowowl_snapshot.yml > /var/log/backup.log 2>&1