Backup your Data¶
Even though Scylla is a fault-tolerant system, it is recommended to regularly backup the data to an external storage. Backup is per node procedure. Make sure to backup each node in your cluster. Backup includes two procedures. These are:
Full Backup - Snapshots¶
Snapshots are taken using
nodetool snapshot. The command first flushes the MemTables from memory to SSTables on disk, then create 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 and increasing amount of disk space. It is important to clear space by clean unnecessary snapshots.
$: cqlsh -e "DESC SCHEMA" > <schema_name.cql>
$: cqlsh -e "DESC SCHEMA" > db_schema.cql
$ nodetool snapshot <KEYSPACE_NAME>
$ nodetool snapshot mykeyspace
/etc/scylla/scylla.yamlfile set the
incremental backupsparameters to
trueand restart the Scylla service. Snapshot are created under Scylla data directory