1
votes

I am using this tool to take Cassandra snapshots of a keyspace: https://github.com/AppliedInfrastructure/cassandra-snapshot-tools

This keyspace has a replication factor of 3 and is hosted on 3 nodes. Is there a way to fully restore it locally on a single-node Cassandra instance with a replication factor of 1?

I tried restoring this way:

sudo bash ./putSnapshot -f backup-20171114152959.tar.gz -n 192.168.0.172 -k backup_restored -d datacenter1 -r 1

-r 1 option should override the replication factor.

While it did work, it seems like some information is missing.

My first guess is that it only restored the data from the first node of 3.

From what I can see only the data from one table is missing and I saw this error when I restored the backup:

Failed to list files in /home/ubuntu/putSnapshot.tmp7564/backup/user-fade6090bee711e7bf39db885b6c90ca

Caused by: java.lang.RuntimeException: Unknown column device during deserialization

So my other guess is that the data was restored from all 3 nodes into 1, but there was an issue with restoring one of the tables in the keyspace. What could cause such an error?

1

1 Answers

1
votes

Yes, it most likely only restored data from one node. Use sstableloader instead as it has the ability to:

Load existing SSTables into another cluster with a different number of nodes or replication strategy.

https://docs.datastax.com/en/cassandra/3.0/cassandra/tools/toolsBulkloader.html