Database Monsters of the World Connect! Virtual Conference | January 12-14
Register Now

Backup your Data

Even though Scylla is a fault-tolerant system, it is recommended to regularly back up the data to external storage. Backup is a per-node procedure. Make sure to back up each node in your cluster. The backup includes two procedures. These are:


For cluster wide backup and restore, see Scylla Manager

Full Backup - Snapshots

Snapshots are taken using nodetool snapshot. First, the command flushes the MemTables from memory to SSTables on disk, and afterward, it creates a hard link for each SSTable in each keyspace. With time, SSTables are compacted, but the hard link keeps a copy of each file. This takes up an increasing amount of disk space. It is important to clear space by clean unnecessary snapshots.


1. Data can only be restored from a snapshot of the table schema, and data exist in a backup. Backup your schema with the following command:
$: cqlsh -e "DESC SCHEMA" > <schema_name.cql>

For example:

$: cqlsh -e "DESC SCHEMA" > db_schema.cql

2. Take a snaphost, including every keyspace you want to backup.
$ nodetool snapshot <KEYSPACE_NAME>
For example:
$ nodetool snapshot mykeyspace
The snapshot is created under Scylla data directory /var/lib/scylla/data
It will have the following structure:
For example:

From one of the nodes, recreate the schema. Repeat these steps for each node in the cluster.

Incremental Backup

Enabling the incremental backup (disabled by default) will create a hard-link from each SSTable, right after it is flushed, to a backups directory.
For a complete point in time backup, the following is required:
  • A snapshot

  • All incremental backups and commit logs from the time of the snapshot.

  • Make sure to delete unnecessary incremental backups. Scylla does not do this automatically.


1. In the /etc/scylla/scylla.yaml file set the incremental backups parameters to true and restart the Scylla service. Snapshot are created under Scylla data directory /var/lib/scylla/data
with the following structure:
For example:

Additional Resources