Restoring a tarball installation from backup

his topic describes how to manually restore a previous DataStax Enterprise (DSE) version from a tarball installation.

When restoring a previous version, it’s important that you don’t change the installation structure. If you must change the structure of the restored installation, you must make any necessary path and configuration adjustments.

To restore a previous DSE, do the following:

  1. Stop the DSE service if it is running.

    /<installation_location>/bin/dse cassandra-stop
  2. Remove the existing DSE installation directory.

    rm -rf /<installation_location>/
  3. Completely purge any existing data or configuration directories and files.

    sudo rm -rf /var/lib/cassandra
    sudo rm -rf /var/log/cassandra
    sudo rm -rf /var/log/spark ## If using Spark
    sudo rm -rf /var/lib/spark ## If using Spark
    sudo rm -rf /var/lib/dsefs ## If using DSEFS

    The directories above are the default. If you have customized your installation directories, make appropriate adjustments to the paths.

  4. Reinstall the old version as described in the documentation for that release of DSE.

    Do not start DSE after installation.

  5. Extract your backup to the root of your drive.

    sudo tar -xvf /backup_path/backup_archive_name.tar -C /
  6. Move the snapshot files up two levels to their keyspace directories. Replace snapshot_name with the name of the snapshot created during the backup.

    sudo find /var/lib/cassandra/data -mindepth 2 -path '*/snapshots/snapshot_name/*' -type f \
    -exec bash -c 'dir={} && cd ${dir%/*} && mv {} ../..' \;

    The directory shown in the previous command is the default. If you customized your installation directories, then make appropriate adjustments to the path.

    If you don’t know the snapshot name, you can find it by browsing the tar archive.

  7. Restore permissions.

    sudo chown dse_username:dse_group /var/lib/cassandra

    The directory shown in the previous command is the default. If you customized your installation directories, then make appropriate adjustments to the path.

  8. Start DSE.

    /<installation_location>/bin/dse cassandra
  9. If you are using DSE Search, rebuild the index (5.1).

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

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