Instructions for migrating your Cortex XSOAR single instance deployment to a high availability installation of Cortex XSOAR.
To migrate a single instance from BoltDB to Elasticsearch with High Availability, there are two steps. First use the Cortex XSOAR migration tool to migrate the database. Then set up additional app servers to achieve high availability.
Migration
The migration tool migrates Cortex XSOAR objects to an Elasticsearch database. When you run the migration tool, the contents of the Cortex XSOAR database are read, and a corresponding object is created in Elasticsearch.
In the BoltDB, data related to incidents and indicators is stored by month in partitions. To minimize downtime during migration, we recommend creating a copy of the database and migrating data that is older than three months from the copied database. This enables you to continue to work in your current environment. When the initial migration completes, migrate the remaining months.
Note
You cannot run more than one migration tool process at a time.
All commands are run from the Cortex XSOAR server machine.
If you are upgrading from Cortex XSOAR v6.0 to v6.5 and you have indicators and audits stored in Elasticsearch in Cortex XSOAR v6.0, upgrade from Cortex XSOAR v6.0 to v6.5 before the migration. Do NOT start the server. Then follow the migration instructions below.
Before you begin, ensure the following:
You have an active instance of Cortex XSOAR v6.5.
All app servers can communicate with Elasticsearch over port 9200.
All app servers have network access to each other over port 443.
Copy the
demisto.lic
file from/usr/local/demisto
directory to the/var/lib/demisto
directory.Add the following entry in the demisto.conf file:
license.file.path:"/var/lib/demisto"
Follow migration instructions:
If you did not previously store indicators and audits in Elasticsearch, follow the migration instructions for single server deployments.
If you used Elasticsearch to store indicators and audits in Cortex XSOAR v6.0 prior to upgrade, ensure the demisto.conf file is up-to-date with the ES object and then Migrate an Existing Elasticsearch Deployment.
Migration Tool Flags
Flag | Type | Description | Required |
---|---|---|---|
| String | A comma-separated list of accounts to migrate. If not specified, all accounts are migrated. | Optional |
| String | The path to the configuration file for the server. Default: | Optional |
| String | The path to the database directory. Default: | Optional |
| Integer | The number of indicators per batch to write to Elasticsearch indexes. Default: | Optional |
| String | The index prefix used in Elasticsearch. | Optional |
| String | The API key to connect to Elasticsearch. | Required (unless a username and password are used) |
| String | The password to connect to Elasticsearch. | Required (unless API key is used) |
| String | The URL of your Elasticsearch environment. Default: | Required |
| String | The username to connect to Elasticsearch. | Required (unless API key is used) |
| String | The path to the file with the IDs to ignore, per object. | Optional |
| String | The log level to display. Default: | Optional |
| String | The location of the log file.Default: | Optional |
| Integer | Log individual failed items, either in a single meta file, or file per item failure. Values:
| Optional |
| Boolean | By default, the Elasticsearch tool checks existing indexes and migrates only the ones that are new. Using this flag, the Elasticsearch tool migrates all indexes even if they currently exist. This is useful, for example, if there was an error or invalid data that was fixed. When used, the objects-to-migrate and objects-to-ignore flags are ignored. Values:
| Optional |
| String | Comma-separated list of objects not to migrate. When the migrate-all flag is used, this flag is ignored. | Optional |
| String | Comma-separated list of objects to migrate. When the migrate-all flag is used, this flag is ignored. | Optional |
| String | Comma-separated list of partitions to migrate. If no partitions are specified, all partitions are migrated. | Optional |
| String | Comma-separated list of partitions to exclude. | Optional |
| N/a | Show results of the previous migration. | Optional |
| Boolean | Existing indicators are not modified during the migration. Values:
| Optional |
| Integer | The maximum size, in megabytes, of objects that will be migrated to Elasticsearch. The default is 100 MB. | |
| Boolean | Retry the migration of large objects when re-running the migration tool. With this flag, the entire bucket that contains the skipped large object is migrated again, which may include data that was previously migrated. If new data has been added in Elasticsearch since the earlier migration, this data will be overwritten. | |
| Boolean | When the partitions flag is used, the | |
| Integer | Provides an option to migrate X number of partitions back. For example, migrating 3 partitions back migrates the current month and the previous two months. If set to 0 or not used, all partitions are migrated. | |
| Boolean | Can only be used with the partitions-back flag. Migrates all partitions other than the most recent partitions specified with partitions-back. For example, | |
| N/a | Prints the migration tool version. | Optional |
| N/a | Answers yes to all questions, unless there is an error. | Optional |
High Availability
If you are implementing high availability and have not configured your load balancer to provide SSL, ensure that you have the same certificates for all the app servers and that the web certificate contains all the app server and load balancer URLs.
When working in a high availability configuration, you must mount
/var/lib/demisto/
on a shared file system, to allow application servers to share files such as license, artifacts, and attachments. When migrating an existing file system to a shared file system, move the/var/lib/demisto
folder without the/var/lib/demisto/temp
subdirectory to the shared directory.The
temp
directory must be local and not shared. To change the location of thetemp
directory, edit thefolders.temp
key in thedemisto.conf
file.Set the app server’s hostname by editing the
demisto.conf
file:Under the Server object, set the value of the
inClusterHostname
parameter to the desired hostname. The hostname should be the internal address used for communication with the other app servers.Install additional app servers.
Verify that the clocks on the app servers are synchronized with an NTP server.