Restoring a Tarball from Backup
Restore a previous DSE version from a tarball install.
-
Stop the DSE service if it is running.
/<installation_location>/bin/dse cassandra-stop
-
Remove the existing DSE installation directory.
rm -rf /<installation_location>/
-
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.
-
Reinstall the old version as described in the documentation for that release of DataStax Enterprise.
Do not start DSE after installation.
-
Extract your backup to the root of your drive.
sudo tar -xvf /backup_path/backup_archive_name.tar -C /
-
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 cannot remember the snapshot name, you can find it by browsing the tar archive.
-
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.
-
Start DSE.
/<installation_location>/bin/dse cassandra
-
If you are using DSE Search, rebuild the index (5.1).