Workaround for compatibility issue, backup and restore using an older ScyllaDB version

Apart from the approach listed above, I gave it a go with Scylla Manager as well. On old cluster running version 4.2.1 of ScyllaDB, after configuring Wasabi bucket to store backups and verifying that the setup works, I took a backup of a keyspace (productdb) via Scylla Manager (v2.2) using following command:

sctool backup -c scprod -L 's3:scbackup' -K 'productdb'

I, then, used DESCRIBE KEYSPACE productdb query via cqlsh to get the schema and stored it for later use.

On new cluster running ScyllaDB v6.0.1, and Scylla Manager v3.3, I set the Wasabi bucket to the same bucket as with old cluster. I SOURCEed the schema dumped previously to prepare for restore. Afterwards, I ran the following command to restore the keyspace

sctool restore -c test-cluster -L 's3:scbackup' -T sm_20240724121252UTC --restore-tables 

It went well for 4% then it failed. On one of the node, I saw following error:

Jul 24 10:08:02 sctest-01.private.example.com scylla[10365]:  [shard 0:strm] sstables_loader - load_and_stream: ops_uuid=1aa26155-8445-4b1c-9939-2baeb0afb438, ks=productdb, table=product, send_ph
ase, err=sstables::malformed_sstable_exception (Failed to read partition from SSTable /var/lib/scylla/data/productdb/product-a7eb7e6049a311efa338c715591e0272/upload/mc-301908-big-Data.db due to Colu
mn cvr missing in current schema)
Jul 24 10:08:02 sctest-01.private.example.com scylla[10365]:  [shard 0:strm] stream_session - [Stream #1aa26155-8445-4b1c-9939-2baeb0afb438] Failed to handle STREAM_MUTATION_FRAGMENTS (receive and distribute p
hase) for ks=productdb, cf=product, peer=10.1.169.163: seastar::nested_exception: std::runtime_error (Sender failed) (while cleaning up after std::runtime_error (Sender failed))
Jul 24 10:08:02 sctest-01.private.example.com scylla[10365]:  [shard 0:strm] sstables_loader - send_meta_data: failed to process source from node=10.1.169.163, err=std::runtime_error (send_meta_data: got error
 code=-1 from node=10.1.169.163)
Jul 24 10:08:02 sctest-01.private.example.com scylla[10365]:  [shard 0:strm] sstables_loader - load_and_stream: ops_uuid=1aa26155-8445-4b1c-9939-2baeb0afb438, ks=productdb, table=product, finish_
phase, err=std::runtime_error (send_meta_data: got error code=-1 from node=10.1.169.163)

I don’t know what to try next or where to look.
Entire idea was to at least have a backup which can be restored so that we could migrate to newer cluster avoiding potential disaster of data loss.

It looks like the error points to a different schema than the one existing in the backup. In this case, column cvr is missing. You should restore to the same schema as the source SSTables expect. IIRC, back in SM 2.2 days we used to dump the schema cql alongside the SSTables.

1 Like