Migrating Encrypted Tables from Earlier Versions
Steps to migrate encrypted tables from earlier versions to the latest version of DataStax Enterprise.
Procedure
-
Back up the entire keyspace that has a
dse_system.encrypted_keys
table. -
Back up all system keys.
-
Upgrade the cluster to DataStax Enterprise 6.9, following the DataStax Upgrade Guide instructions.
-
Restart the cluster.
-
Check that the
dse_system.encrypted_keys
table was created using the cqlshDESCRIBE KEYSPACE
command.If you need to restore the
dse_system.encrypted_keys
table, load the table. Do not truncate or delete anything. -
If the
dse_system.encrypted_keys
table was created, go to the next step; otherwise, create the table manually:CREATE KEYSPACE dse_system WITH replication = {'class': 'EverywhereStrategy'}; USE dse_system; CREATE TABLE encrypted_keys ( key_file text, cipher text, strength int, key_id timeuuid, key text, PRIMARY KEY (key_file, cipher, strength, key_id) );
EverywhereStrategy
is the default replication strategy for thedse_system
andsolr_admin
keyspaces. Do not use or alter any other instances ofEverywhereStrategy
. -
Rewrite all SSTables.
nodetool upgradesstables --include-all-sstables
-
Verify if the search index files are encrypted:
dsetool list_index_files <keyspace_name> <table_name>
-
Perform offline index encryption.
dsetool upgrade_index_files <keyspace_name>.<table_name> -h <IP_address> [options]
You can specify the following options:
- keyspace_name.table_name
-
Required. The keyspace and table names of the search index. Keyspace and table names are case-sensitive. Enclose names that contain uppercase in double quotation marks.
- -h IP_address
-
Required. Node hostname or IP address of the remote node that contains the encryption configuration that is used for index encryption. The remote node must be running.
- -c port
-
The DSE port on the remote node that contains the encryption configuration.
- --backup
-
Preserves the index files from the current index as a backup after successful upgrade. The preserved index file backup is moved to the
--workspace
directory. When not specified, index files from the current index are deleted. - --workspace directory
-
The workspace directory for the upgrade process. The upgraded index is created in this directory. When not specified, the default directory is the same directory that contains the search index files.
- --index directory
-
The data directory that contains the search index files. When not specified, the default directory is inferred from the search index name.