From 0ba37fa431bccb4ca57b81ea6c4cd281a76bd39a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Botond=20D=C3=A9nes?= Date: Fri, 30 Jun 2023 09:38:45 +0300 Subject: [PATCH] Merge 'doc: fix rollback in the 4.3-to-2021.1, 5.0-to-2022.1, and 5.1-to-2022.2 upgrade guides' from Anna Stuchlik This PR fixes the Restore System Tables section of the upgrade guides by adding a command to clean upgraded SStables during rollback or adding the entire section to restore system tables (which was missing from the older documents). This PR fixes is a bug and must be backported to branch-5.3, branch-5.2., and branch-5.1. Refs: https://github.com/scylladb/scylla-enterprise/issues/3046 - [x] 5.1-to-2022.2 - update command (backport to branch-5.3, branch-5.2, and branch-5.1) - [x] 5.0-to-2022.1 - add "Restore system tables" to rollback (backport to branch-5.3, branch-5.2, and branch-5.1) - [x] 4.3-to-2021.1 - add "Restore system tables" to rollback (backport to branch-5.3, branch-5.2, and branch-5.1) (see https://github.com/scylladb/scylla-enterprise/issues/3046#issuecomment-1604232864) Closes #14444 * github.com:scylladb/scylladb: doc: fix rollback in 4.3-to-2021.1 upgrade guide doc: fix rollback in 5.0-to-2022.1 upgrade guide doc: fix rollback in 5.1-to-2022.2 upgrade guide (cherry picked from commit 8a7261fd70b64f4348f7b5b07854cca7fee9c2b4) --- ...e-guide-from-4.3-to-2021.1-ubuntu-and-debian.rst | 13 +++++++++++++ ...e-guide-from-5.0-to-2022.1-ubuntu-and-debian.rst | 13 +++++++++++++ .../upgrade-guide-from-4.3-to-2021.1-rpm.rst | 13 +++++++++++++ .../upgrade-guide-from-5.0-to-2022.1-rpm.rst | 13 +++++++++++++ .../upgrade-guide-from-5.1-to-2022.2-generic.rst | 4 +++- 5 files changed, 55 insertions(+), 1 deletion(-) diff --git a/docs/upgrade/_common/upgrade-guide-from-4.3-to-2021.1-ubuntu-and-debian.rst b/docs/upgrade/_common/upgrade-guide-from-4.3-to-2021.1-ubuntu-and-debian.rst index 641116d859..11c42a3d61 100644 --- a/docs/upgrade/_common/upgrade-guide-from-4.3-to-2021.1-ubuntu-and-debian.rst +++ b/docs/upgrade/_common/upgrade-guide-from-4.3-to-2021.1-ubuntu-and-debian.rst @@ -179,6 +179,19 @@ Restore the configuration files for conf in $(cat /var/lib/dpkg/info/scylla-*server.conffiles /var/lib/dpkg/info/scylla-*conf.conffiles /var/lib/dpkg/info/scylla-*jmx.conffiles | grep -v init ) /etc/systemd/system/{var-lib-scylla,var-lib-systemd-coredump}.mount; do sudo cp -v $conf.backup-4.3 $conf; done sudo systemctl daemon-reload (Ubuntu 16.04) +Restore system tables +--------------------- + +Restore all tables of **system** and **system_schema** from the previous snapshot because 2021.1 uses a different set of system tables. See :doc:`Restore from a Backup and Incremental Backup ` for reference. + +.. code:: console + + cd /var/lib/scylla/data/keyspace_name/table_name-UUID/ + sudo find . -maxdepth 1 -type f -exec sudo rm -f "{}" + + cd /var/lib/scylla/data/keyspace_name/table_name-UUID/snapshots// + sudo cp -r * /var/lib/scylla/data/keyspace_name/table_name-UUID/ + sudo chown -R scylla:scylla /var/lib/scylla/data/keyspace_name/table_name-UUID/ + Start the node -------------- diff --git a/docs/upgrade/_common/upgrade-guide-from-5.0-to-2022.1-ubuntu-and-debian.rst b/docs/upgrade/_common/upgrade-guide-from-5.0-to-2022.1-ubuntu-and-debian.rst index 1b7f3a2650..ac964b70d8 100644 --- a/docs/upgrade/_common/upgrade-guide-from-5.0-to-2022.1-ubuntu-and-debian.rst +++ b/docs/upgrade/_common/upgrade-guide-from-5.0-to-2022.1-ubuntu-and-debian.rst @@ -184,6 +184,19 @@ Restore the configuration files for conf in $(cat /var/lib/dpkg/info/scylla-*server.conffiles /var/lib/dpkg/info/scylla-*conf.conffiles /var/lib/dpkg/info/scylla-*jmx.conffiles | grep -v init ) /etc/systemd/system/{var-lib-scylla,var-lib-systemd-coredump}.mount; do sudo cp -v $conf.backup-5.0 $conf; done sudo systemctl daemon-reload +Restore system tables +--------------------- + +Restore all tables of **system** and **system_schema** from the previous snapshot because 2022.1 uses a different set of system tables. See :doc:`Restore from a Backup and Incremental Backup ` for reference. + +.. code:: console + + cd /var/lib/scylla/data/keyspace_name/table_name-UUID/ + sudo find . -maxdepth 1 -type f -exec sudo rm -f "{}" + + cd /var/lib/scylla/data/keyspace_name/table_name-UUID/snapshots// + sudo cp -r * /var/lib/scylla/data/keyspace_name/table_name-UUID/ + sudo chown -R scylla:scylla /var/lib/scylla/data/keyspace_name/table_name-UUID/ + Start the node -------------- diff --git a/docs/upgrade/upgrade-to-enterprise/upgrade-guide-from-4.3-to-2021.1/upgrade-guide-from-4.3-to-2021.1-rpm.rst b/docs/upgrade/upgrade-to-enterprise/upgrade-guide-from-4.3-to-2021.1/upgrade-guide-from-4.3-to-2021.1-rpm.rst index f342f23647..b2d7ea16e7 100644 --- a/docs/upgrade/upgrade-to-enterprise/upgrade-guide-from-4.3-to-2021.1/upgrade-guide-from-4.3-to-2021.1-rpm.rst +++ b/docs/upgrade/upgrade-to-enterprise/upgrade-guide-from-4.3-to-2021.1/upgrade-guide-from-4.3-to-2021.1-rpm.rst @@ -167,6 +167,19 @@ Restore the configuration file for conf in $( rpm -qc $(rpm -qa | grep scylla) | grep -v contains ) /etc/systemd/system/{var-lib-scylla,var-lib-systemd-coredump}.mount; do sudo cp -v $conf.backup-4.3 $conf; done +Restore system tables +--------------------- + +Restore all tables of **system** and **system_schema** from the previous snapshot because 2021.1 uses a different set of system tables. See :doc:`Restore from a Backup and Incremental Backup ` for reference. + +.. code:: console + + cd /var/lib/scylla/data/keyspace_name/table_name-UUID/ + sudo find . -maxdepth 1 -type f -exec sudo rm -f "{}" + + cd /var/lib/scylla/data/keyspace_name/table_name-UUID/snapshots// + sudo cp -r * /var/lib/scylla/data/keyspace_name/table_name-UUID/ + sudo chown -R scylla:scylla /var/lib/scylla/data/keyspace_name/table_name-UUID/ + Start the node -------------- diff --git a/docs/upgrade/upgrade-to-enterprise/upgrade-guide-from-5.0-to-2022.1/upgrade-guide-from-5.0-to-2022.1-rpm.rst b/docs/upgrade/upgrade-to-enterprise/upgrade-guide-from-5.0-to-2022.1/upgrade-guide-from-5.0-to-2022.1-rpm.rst index 9978a8c337..447055681a 100644 --- a/docs/upgrade/upgrade-to-enterprise/upgrade-guide-from-5.0-to-2022.1/upgrade-guide-from-5.0-to-2022.1-rpm.rst +++ b/docs/upgrade/upgrade-to-enterprise/upgrade-guide-from-5.0-to-2022.1/upgrade-guide-from-5.0-to-2022.1-rpm.rst @@ -172,6 +172,19 @@ Restore the configuration file for conf in $( rpm -qc $(rpm -qa | grep scylla) | grep -v contains ) /etc/systemd/system/{var-lib-scylla,var-lib-systemd-coredump}.mount; do sudo cp -v $conf.backup-5.0 $conf; done +Restore system tables +--------------------- + +Restore all tables of **system** and **system_schema** from the previous snapshot because 2022.1 uses a different set of system tables. See :doc:`Restore from a Backup and Incremental Backup ` for reference. + +.. code:: console + + cd /var/lib/scylla/data/keyspace_name/table_name-UUID/ + sudo find . -maxdepth 1 -type f -exec sudo rm -f "{}" + + cd /var/lib/scylla/data/keyspace_name/table_name-UUID/snapshots// + sudo cp -r * /var/lib/scylla/data/keyspace_name/table_name-UUID/ + sudo chown -R scylla:scylla /var/lib/scylla/data/keyspace_name/table_name-UUID/ + Start the node -------------- diff --git a/docs/upgrade/upgrade-to-enterprise/upgrade-guide-from-5.1-to-2022.2/upgrade-guide-from-5.1-to-2022.2-generic.rst b/docs/upgrade/upgrade-to-enterprise/upgrade-guide-from-5.1-to-2022.2/upgrade-guide-from-5.1-to-2022.2-generic.rst index 725f19a38d..4ea181e6ce 100644 --- a/docs/upgrade/upgrade-to-enterprise/upgrade-guide-from-5.1-to-2022.2/upgrade-guide-from-5.1-to-2022.2-generic.rst +++ b/docs/upgrade/upgrade-to-enterprise/upgrade-guide-from-5.1-to-2022.2/upgrade-guide-from-5.1-to-2022.2-generic.rst @@ -346,8 +346,10 @@ Restore system tables Restore all tables of **system** and **system_schema** from the previous snapshot because |NEW_VERSION| uses a different set of system tables. See :doc:`Restore from a Backup and Incremental Backup ` for reference. -.. code:: sh +.. code:: console + cd /var/lib/scylla/data/keyspace_name/table_name-UUID/ + sudo find . -maxdepth 1 -type f -exec sudo rm -f "{}" + cd /var/lib/scylla/data/keyspace_name/table_name-UUID/snapshots// sudo cp -r * /var/lib/scylla/data/keyspace_name/table_name-UUID/ sudo chown -R scylla:scylla /var/lib/scylla/data/keyspace_name/table_name-UUID/