nodetool upgradesstables

Rewrites SSTables for tables that are not running the current version of Hyper-Converged Database (HCD) to match current HCD version. Use this command when upgrading your server or changing compression options.

If the SSTables are already on the current version, the command returns immediately and no action is taken.

See sstableupgrade for SSTable compatibility with the current HCD version.

If you have hard-linked snapshots or backups, running this tool increases the disk utilization up to the amount of space each table occupies on disk. Prior to running this tool, DataStax recommends that you check for available disk space and/or prune existing snapshots and backups to ensure there is enough space. However, it is prudent to retain at least one snapshot in case a restore is necessary.

Synopsis

nodetool [<connection_options>] upgradesstables
[-a] [-j <num_jobs>] [--]
[<keyspace_name> <table_name> [<table_name> ...]]

Definition

The short- and long-form options are comma-separated.

Connection options

-h, --host hostname

The hostname or IP address of a remote node or nodes. When omitted, the default is the local machine.

-p, --port jmx_port

The JMX port number.

-pw, --password jmxpassword

The JMX password for authenticating with secure JMX. If a password is not provided, you are prompted to enter one.

-pwf, --password-file jmx_password_filepath

The filepath to the file that stores JMX authentication credentials.

-u, --username jmx_username

The username for authenticating with secure JMX.

Command arguments

--

Separates an option from an argument that could be mistaken for an option.

-a, --include-all-sstables

Upgrade target SSTables, including SSTables already on the current HCD version.

-j, --jobs num_jobs
  • num_jobs - Number of SSTables affected simultaneously. Default: 2.

  • 0 - Use all available compaction threads.

keyspace_name

The keyspace name.

table_name

One or more table names, separated by a space.

Examples

Upgrade all SSTables in the cycling keyspace

nodetool upgradesstables --include-all-sstables cycling

Upgrade all SSTables in the cycling keyspace and the cyclist_name table

nodetool upgradesstables --include-all-sstables cycling cyclist_name

Force upgrade all SSTables

Force upgrade the SSTables for the specified keyspace and table, including SSTables already on the current HCD version.

nodetool upgradesstables -a keyspace_name table_name

Upgrade four SSTables simultaneously until all SSTables are upgraded

nodetool upgradesstables --include-all-sstables --jobs 4

The number of jobs cannot exceed the concurrent compactors configured in cassandra.yaml.

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2025 DataStax | Privacy policy | Terms of use | Manage Privacy Choices

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com