Skip to content

Commit

Permalink
chore(docs): how to avoid restore and backup/repair task interference (
Browse files Browse the repository at this point in the history
…#4147)

This documents how to prevent interference between restore and backup/repair
tasks.

Fixes: #3742
  • Loading branch information
VAveryanov8 committed Dec 10, 2024
1 parent c12903d commit cafd48d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
23 changes: 12 additions & 11 deletions docs/source/restore/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,15 @@ and :ref:`resume <task-start>` it.
Interference with backup and repair tasks
=========================================

It is advisable to manually make sure that the restore task does not interfere with backup or repair tasks.

#. Do not start backup or repair tasks when restore task is running.
#. If scheduled runs of backup or repair tasks can interfier with restore task, then disable them until restore is complete::

# check Next column to determine when next run of a task is scheduled
$ sctool tasks -a

# disable repair/backup tasks if needed
$ sctool repair update -c CLUSTER-ID SCHEDULED-REPAIR-TASK-ID --enabled=false
$ sctool backup update -c CLUSTER-ID SCHEDULED-BACKUP-TASK-ID --enabled=false
The restore task will not start if backup or repair tasks are running in the cluster at that time, and vice versa, if a restore task is running, backup or repair tasks will not start.
You will see an error in the output of the ``sctool tasks`` command if there is a conflict between tasks.
Here is an example output of ``sctool progress -c ${cluster_name} {task_id}`` when there is an interference between tasks::

$ ./sctool.dev progress -c my-cluster backup/06cd5d90-6daa-4215-acd3-d19f6782b5b6
Run: 351378ee-ab05-11ef-aa2d-0242c0a8c802
Status: ERROR (initialising)
Cause: exclusive task (restore) is running: another task is running
Start time: 25 Nov 24 09:13:52 CET
End time: 25 Nov 24 09:13:52 CET
Duration: 0s
Progress: -
2 changes: 1 addition & 1 deletion docs/source/sctool/partials/sctool_repair.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ options:
usage: |
Prints table names together with keyspace, used in combination with --dry-run.
- name: small-table-threshold
default_value: 1G
default_value: 1GiB
usage: |
Enables small table optimization for tables of size lower than given threshold, supported units [B, M, G, T].
- name: start-date
Expand Down
2 changes: 1 addition & 1 deletion docs/source/sctool/partials/sctool_repair_update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ options:
usage: |
Prints table names together with keyspace, used in combination with --dry-run.
- name: small-table-threshold
default_value: 1G
default_value: 1GiB
usage: |
Enables small table optimization for tables of size lower than given threshold, supported units [B, M, G, T].
- name: start-date
Expand Down

0 comments on commit cafd48d

Please sign in to comment.