Was this page helpful?
Caution
You're viewing documentation for a previous version of ScyllaDB Enterprise. Switch to the latest stable version.
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:
Full Backup - copy the entire data of a node
Incremental - updates (delta) - flushed SSTables
Note
For cluster wide backup and restore, see ScyllaDB Manager.
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.
Procedure
$: cqlsh -e "DESC SCHEMA" > <schema_name.cql>
For example:
$: cqlsh -e "DESC SCHEMA" > db_schema.cql
$ nodetool snapshot <KEYSPACE_NAME>
$ nodetool snapshot mykeyspace
/var/lib/scylla/data
keyspace_name/table_name-UUID/snapshots/snapshot_name
/mykeyspace/team_roster-91cd2060f99d11e6a47a000000000000/snapshots/1487847672222
From one of the nodes, recreate the schema. Repeat these steps for each node in the cluster.
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.
Procedure
/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
keyspace_name/table_name-UUID/backups/backups_name
/mykeyspace/team_roster-91cd2060f99d11e6a47a000000000000/backups/1437827672721
Was this page helpful?