Skip to content

Commit

Permalink
feat(docs): backup, add 3.3 tablets and desc schema docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal-Leszczynski committed Jun 26, 2024
1 parent cee8877 commit f3ae3ad
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
7 changes: 6 additions & 1 deletion docs/source/backup/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,14 @@ Process
The backup procedure consists of multiple steps executed sequentially.

#. **Snapshot** - Take a snapshot of data on each node (according to backup configuration settings).
#. (Optional) **Schema** - Upload the schema in CQL text format to the backup storage destination,

Note that ScyllaDB Manager stops `tablets <https://opensource.docs.scylladb.com/stable/architecture/tablets.html>`_ migration for the duration of this step.
#. **Schema** - Upload the schema in CQL text format to the backup storage destination,
this requires that you added the cluster with CQL username and password.
If you didn't you can :ref:`update the cluster using sctool <cluster-update>` at any point in time.

Note that starting from ScyllaDB 6.0 and 2024.2 (and compatible ScyllaDB Manager 3.3),
mentioned CQL files are necessary for performing schema restoration (:ref:`sctool restore --restore-schema <sctool-restore>`).
#. **Upload** - Upload the snapshot to the backup storage destination.
#. **Manifest** - Upload the manifest file containing metadata about the backup.
#. **Purge** - If the retention threshold has been reached, remove the oldest backup from the storage location.
Expand Down
18 changes: 13 additions & 5 deletions docs/source/backup/specification.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,23 +65,31 @@ schema
......

The schema directory contains text dumps of database schema.
They are mainly for information purposes, for restore the backup ``system_schema`` keyspace shall be used.

Starting from ScyllaDB 6.0 and 2024.2 (and compatible ScyllaDB Manager 3.3), they are required for the schema restoration.
They have ``schema_with_internals.json.gz`` suffix and represent the output of ``DESCRIBE SCHEMA WITH INTERNALS`` CQL query,
which returns rows in the format ``keyspace|type|name|CQL create statement`` in the correct order.

For older ScyllaDB versions, those files are mainly for information purposes,
for restore the backup ``system_schema`` keyspace shall be used.
They have ``schema.tar.gz`` suffix and represent schema archive divided among keyspaces.

To enable upload of the files make sure that the cluster is added with username and password flags.

.. code-block:: none
schema
└── cluster
└── 3e99d4a8-67d2-45fe-87fb-87b1b90ea2dc
├── task_f70117d8-c10e-4e90-9606-2587936b3757_tag_sm_20210809095541UTC_schema.tar.gz
├── task_f70117d8-c10e-4e90-9606-2587936b3757_tag_sm_20210809095542UTC_schema.tar.gz
└── task_f70117d8-c10e-4e90-9606-2587936b3757_tag_sm_20210809095748UTC_schema.tar.gz
├── task_f70117d8-c10e-4e90-9606-2587936b3757_tag_sm_20210809095541UTC_schema_with_internals.json.gz
├── task_f70117d8-c10e-4e90-9606-2587936b3757_tag_sm_20210809095542UTC_schema_with_internals.json.gz
└── task_f70117d8-c10e-4e90-9606-2587936b3757_tag_sm_20210809095748UTC_schema_with_internals.json.gz
The schema file path is structured as follows.

.. code-block:: none
meta/cluster/<cluster ID>/task_<task ID>_tag_<snapshot tag>_schema.tar.gz
meta/cluster/<cluster ID>/task_<task ID>_tag_<snapshot tag>_schema_with_internals.json.gz
sst
...
Expand Down

0 comments on commit f3ae3ad

Please sign in to comment.