Restore backup with expired TTL

I have a backup, but TTL for records in this backup already expired. If I’ll try to restore backup using scylla manager, it will download sstables and run load&stream, but that means during compaction all rows will be deleted because TTL for this records is expired.

setting TTL = 0 on the table level will not help, because if the table have TTL set the got written to it with an expiration date set, and nothing can remove it.

I have 2 ideas in mind

  • change time on entire cluster (to be honest I don’t want to use this trick)
  • use sstableloader - but it’s too slow,

are any other options available?

sstableloader is not an option because if tables have uuid_sstable_identifiers_enabled: true

Hi,
speaking from ScyllaDB Manager POV, I believe that the trick with the clock is the only way. There are ways to ensure that the data with expired TTL remains on the disk (by disabling table’s tombstone_gc and compaction options), but you still need to somehow force ScyllaDB to return this data despite the expired TTL, and I don’t think that’s possible (you can’t use USING TIMESTAMP on select queries).

1 Like