Menu

Caution

You are not reading the most current version of the documentation. If you want up-to-date information, please have a look at 2.5 .

Extract schema from metadataΒΆ

Prerequisites

  1. You have the snapshot tag.

  2. The snapshot contains schema.tar.gz file.

Procedure

  1. List files located in snapshot you want to restore.

    sctool backup files -c my-cluster -L s3:backups -T sm_20191210145143UTC
    

    The first output line is a path to schemas archive, for example:

    s3://backups/backup/schema/cluster/ed63b474-2c05-4f4f-b084-94541dd86e7a/task_287791d9-c257-4850-aef5-7537d6e69d90_tag_sm_20200506115612UTC_schema.tar.gz      ./
    
  2. Download schema archive.

    aws s3 cp s3://backups/backup/schema/cluster/ed63b474-2c05-4f4f-b084-94541dd86e7a/task_287791d9-c257-4850-aef5-7537d6e69d90_tag_sm_20200506115612UTC_schema.tar.gz ./
    
  3. Extract CQL files from archive. This archive contains a single CQL file for each keyspace in the backup.

    tar -xzvf task_287791d9-c257-4850-aef5-7537d6e69d90_tag_sm_20200506115612UTC_schema.tar.gz