Offline Upgrade Backup and Restore Module¶
This page explains how to install or upgrade the backup and restore module after downloading it from the Download Center.
Info
The term 'kcoral' used in the following commands or scripts is the internal development code name for the backup and restore module.
Load Images from Downloaded Package¶
You can load the images using one of the following two methods. When an image repository exists in the environment, it is recommended to use chart-syncer to synchronize the images to the image repository, as it is more efficient and convenient.
Method 1: Use chart-syncer to Synchronize Images¶
Using chart-syncer, you can upload the charts and their dependent image packages from the downloaded package to the image repository and Helm repository used by the installer.
First, find a node that can connect to the image repository and Helm repository (such as the Spark node), and create a load-image.yaml configuration file on the node, filling in the configuration information for the image repository and Helm repository.
-
Create load-image.yaml file
Note
All parameters in this YAML file are required.
If the current environment has already installed the chart repo, chart-syncer also supports exporting the chart as a tgz file.
load-image.yamlsource: intermediateBundlesPath: kcoral # The path where the .tar.gz package is located after using chart-syncer target: containerRegistry: 10.16.10.111 # Image repository address containerRepository: release.daocloud.io/kcoral # Image repository path repo: kind: HARBOR # Helm Chart repository type url: http://10.16.10.111/chartrepo/release.daocloud.io # Helm repository address auth: username: "admin" # Image repository username password: "Harbor12345" # Image repository password containers: auth: username: "admin" # Helm repository username password: "Harbor12345" # Helm repository password
If the current node does not have a helm repo added, chart-syncer also supports exporting the chart as a tgz file and storing it in the specified path.
load-image.yamlsource: intermediateBundlesPath: kcoral # The path where the .tar.gz package is located after using chart-syncer target: containerRegistry: 10.16.10.111 # Image repository URL containerRepository: release.daocloud.io/kcoral # Image repository path repo: kind: LOCAL path: ./local-repo # Local path to the chart containers: auth: username: "admin" # Image repository username password: "Harbor12345" # Image repository password
-
Run the command to synchronize the images.
Method 2: Load Images using Docker or containerd¶
Unpack and load the image files.
-
Extract the tar package.
After successful extraction, you will get three files:
- hints.yaml
- images.tar
- original-chart
-
Load the images into Docker or containerd from the local directory.
Note
Each node needs to perform the Docker or containerd image loading operation. After loading is complete, tag the images to ensure consistency with the Registry and Repository used during installation.
Upgrade¶
There are two upgrade methods. You can choose the appropriate upgrade method based on the preconditions:
-
Check if the backup and restore Helm repository exists.
If the result is empty or shows the following prompt, proceed to the next step. Otherwise, skip the next step.
-
Add the backup and restore Helm repository.
-
Update the backup and restore Helm repository.
-
Select the backup and restore version you want to install (it is recommended to install the latest version version).
-
Back up the
--set
parameters.Before upgrading the backup and restore version, it is recommended to run the following command to back up the
--set
parameters of the old version. -
Update kcoral crds
-
Run
helm upgrade
.Before upgrading, it is recommended to replace the global.imageRegistry field in the bak.yaml file with the image repository address you are currently using.
-
Back up the
--set
parameters.Before upgrading the backup and restore version, it is recommended to run the following command to back up the
--set
parameters of the old version. -
Update kcoral crds
-
Run
helm upgrade
.Before upgrading, it is recommended to replace the global.imageRegistry in the bak.yaml file with the image repository address you are currently using.