Migrating encrypted tables from earlier versions 

Encrypted tables require specific actions to migrate to later versions of DataStax Enterprise.

Steps to migrate encrypted tables from earlier versions to the latest version of DataStax Enterprise.

Procedure

  1. Back up the entire keyspace that has a dse_system.encrypted_keys table.
  2. Back up all system keys.
  3. Upgrade the cluster to DataStax Enterprise 5.0, following the DataStax Upgrade Guide instructions.
  4. Restart the cluster.
  5. Check that the dse_system.encrypted_keys table was created using the cqlsh DESCRIBE KEYSPACES command.

    If you need to restore the dse_system.encrypted_keys table, load the table. Do not truncate or delete anything.

  6. 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)
    );
  7. Rewrite all SSTables.
    $ nodetool upgradesstables --include-all-sstables
  8. Verify if the Solr index files are encrypted:
    $ dsetool list_index_files keyspace.table
  9. Perform offline index encryption. The node that contains the encryption configuration must be running. The local node is offline. The user that runs this command must have read and write permissions to the directory that contains the index files.
    $ dsetool upgrade_index_files keyspace.table -h IP_address [options]
    You can specify the following options:
    • -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 cassandra_port - The Cassandra 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. When not specified, index files from the current index are deleted.
    • --workspace directory - Specifies the workspace directory for the upgrade process. The upgraded index is created in this directory. When --backup is specified, the preserved index file backup is moved here. When not specified, the default directory is the same directory that contains the Solr index files.
    • --index directory - Specifies the data directory that contains the Solr index files. When not specified, the default directory is inferred from the Solr core name.