Displaying present location in the site.

Introducing the Function of EXPRESSCLUSTER: Simplify Backup/Restore

EXPRESSCLUSTER Official Blog

February 25th, 2022

Machine translation is used partially for this article. See the Japanese version for the original article.

Introduction

EXPRESSCLUSTER X enables various configurations on the clouds without requiring built-in by linking with services provided by various cloud vendors. In addition, there are many enhancements such as security enhancements, support for Infrastructure as Code (IaC), and improvements to the management GUI, so please refer to popuphere.
This time, we will introduce pre- and post-processing commands for backup/restore, which is the new feature of EXPRESSCLUSTER X 4.3.

Contents

1. What are Pre- and Post-Processing Commands for Backup/Restore?

The commands that is used to pre- and post-processing for backup/restore of partitions for mirror/hybrid disks are available in EXPRESSCLUSTER X 4.3 or later.
In EXPRESSCLUSTER X 4.2 or before, it was necessary to perform multiple procedures before and after the backup/restore. But in EXPRESSCLUSTER X 4.3 or later, it is possible to do so with simple procedures.

Failure to perform backup/restore in the correct procedures can result in the file system incomplete backups, data regurgitation or inconsistencies, and other events after the restore.
By executing pre- and post-processing commands for backup/restore before and after the backup/restore, we can automatically perform what we need to do, simplifying the work and preventing fatal work mistakes.

For more information of pre- and post-processing commands for backup/restore, refer to followings:

[Reference]
  • Manuals > EXPRESSCLUSTER X > EXPRESSCLUSTER X 4.3 for Windows > Reference Guide

  • 8. EXPRESSCLUSTER command reference
  • 8.13 Mirror-related commands
  • 8.13.9 Preparing for backup to a disk image (clpbackup command)
  • 8.13.10 Perform the processing after restoring from a disk image (clprestore command)

  • Manuals > EXPRESSCLUSTER X > EXPRESSCLUSTER X 4.3 for Linux > Reference Guide

  • 8. EXPRESSCLUSTER command reference
  • 8.14 Mirror-disk-related commands
  • 8.14.4 Preparing for backup to a disk image (clpbackup.sh command)
  • 8.14.5 Perform the processing after restoring from a disk image (clprestore.sh command)

2. Assumed Configuration for Backup/Restore

In this time, we will use pre- and post-processing commands for backup/restore on a mirror disk type HA cluster with 2 nodes in a physical environment.
The commands are also available in cloud environments.

  • * The basic flow of backup/restore procedures is similar in Windows and Linux. The following procedures are mainly for Windows execution examples.
    If some command lines and verification procedures are different in the OS, we will describe the execution examples of each OS, so please check the procedures of the corresponding OS.

The configuration diagram of the HA cluster is as follows:

Configuration

EXPRESSCLUSTER's configuration is as follows:
Please read the following to your environment appropriately.

  • EXPRESSCLUSTER

  • Servers
  • ■ Active server                   : server01
  • ■ Standby server                  : server02
  •  
  • Failover group:failover
  • ■ Floating IP resource            : fip
  • ■ Mirror disk resource            : md
  •  
  • Monitor resources
  • ■ Floating IP monitor resource    : fipw1
  • ■ Mirror connect monitor resource : mdnw1
  • ■ Mirror disk monitor resource    : mdw1

3. Backup Procedure by Using Pre- and Post-Processing Command for Backup

This time, we will introduce the procedure when backing up the partitions for mirror disk for each active/standby server for the HA cluster one by one.

The image diagram of the backup procedure for the standby server is as follows.
When backing up the active server, fail over failover groups to the standby server, and then perform the same procedure.

For information of backup considerations, other backup procedures, and the detailed instructions, refer to followings:

[Reference]
  • Manuals > EXPRESSCLUSTER X > EXPRESSCLUSTER X 4.3 for Windows > Maintenance Guide

  • 2. The system maintenance information
  • 2.22 How to back up a mirror/hybrid disk to its disk image

  • Manuals > EXPRESSCLUSTER X > EXPRESSCLUSTER X 4.3 for Linux > Maintenance Guide

  • 2. The system maintenance information
  • 2.16 How to back up a mirror/hybrid disk to its disk image

3.1 Stop Failover Group and Mirror Synchronization

Verify that the mirror disk is synchronized successfully.
After checking the synchronization status, stop the failover group to ensure a rest point.
Run the following commands on the active server.

Example for running commands

> clpmdstat --mirror md
Mirror Status: Normal

  md          server01              server02
  ------------------------------------------------------------------
  Mirror Color                GREEN                GREEN
  Fast Copy                   NG                      NG
  Needed Copy Percent   0%                     1%
  Volume Used Percent   1%                     1%
  Volume Size                4093MB            4093MB

Command succeeded.

> clpgrp -t failover
Command succeeded.


Suspend the mirror disk monitor resource to prevent auto mirror recovery from performing. Run the following commands on the active server.
* Suspends mirror disk monitor of both active and standby servers.

Example for running commands

> clpmonctrl -s -h server01 -m mdw1
Command succeeded.
> clpmonctrl -s -h server02 -m mdw1
Command succeeded.


Stop the mirror synchronization.
Run the following command on the standby server.

Example for running the command

> clpmdctrl --break md
Command succeeded.


If you want to resume your business immediately, start failover group on the active server at this stage. Run the following command on the active server.

Example for running the command

> clpgrp -s failover
Command succeeded.

3.2 Run Pre-Processing Command for Backup on the Standby Server

Run the following command on the standby server.
* Commands are different for Windows and Linux.

Example for running the command (Windows)

> clpbackup --pre
clpbackup.bat : Beginning backup-mode.
Command succeeded.
clpbackup.bat : Changing the setting of cluster services to Manual Startup.
clpbackup.bat : Shutting down...
Command succeeded.
clpbackup.bat : Command succeeded.


Example for running the command (Linux)

# clpbackup.sh --pre
clpbackup.sh : Beginning backup-mode.
All backup flags have set to <ON>.
clpbackup.sh : Changing the setting of cluster services to Manual Startup.
clpbackup.sh : Shutting down...
Command succeeded.
clpbackup.sh : Command succeeded.

When running the commands, the mirror disk enters backup mode, EXPRESSCLUSTER services are set not automatically started. And then shut down the server.

3.3 Backup

Make an image backup of the mirror disk space on the standby server.

3.4 Run Post-Processing Command for Backup on the Standby Server

Start the standby sever, and run the following command on the standby server.
* Commands are different for Windows and Linux.

Example for running the command (Windows)

> clpbackup --post
clpbackup.bat : Ending backup-mode.
Command succeeded.
clpbackup.bat : Changing the setting of cluster services to Auto Startup.
clpbackup.bat : Rebooting...


Example for running the command (Linux)

# clpbackup.sh --post
clpbackup.sh : Starting Mirror Agent.
Command succeeded.
clpbackup.sh : Ending backup-mode.
All backup flags have set to <OFF>.
clpbackup.sh : Changing the setting of cluster services to Auto Startup.
clpbackup.sh : Stopping Mirror Agent.
Command succeeded.
clpbackup.sh : Rebooting...


When you run the command, the mirror disk enters normal mode, EXPRESSCLUSTER services are set automatically started. And then reboot the server.

3.5 Restart Mirror Synchronization

Resume mirror disk monitor resource on the active server. Run the following command on the active server.

Example for running the command

> clpmonctrl -r -h server01 -m mdw1
Command succeeded.
* After reboot, the standby server automatically returns to the cluster and the mirror disk monitor resource also resumes automatically.

If the failover group has stopped on the active server, start it and restart mirror synchronization. Run the following command on the active server.


Example for running the command

> clpgrp -s failover
Command succeeded.

3.6 Switch and Back up the Active Server

Fail over the failover group and switch active server manually. Then perform steps 3.1 to 3.5 and back up the other server as well.

4. Restore Procedure by Using Pre- and Post-Processing Command for Restore

This time, we will introduce the procedure when restoring the disks for mirror disk space from the disk images of each active/standby server for the HA cluster at the same time.

The image diagram of the restore procedure is as follows:

In "3. Backup Procedure by Using Pre- and Post-Processing Command for Backup", we made the disk images for mirror disk space at different times one by one on the active/standby servers. So it is finally necessary to make a full copy of the mirror disk.
In addition, it is also possible to omit a full copy after restoring by restoring the one mirror disk image to each active/standby server.

For information of restore considerations, other restore procedures, and the detailed instructions, refer to followings:

[Reference]
  • Manuals > EXPRESSCLUSTER X > EXPRESSCLUSTER X 4.3 for Windows > Maintenance Guide

  • 2. The system maintenance information
  • 2.23 How to restore the mirror/hybrid disk from the disk image

  • Manuals > EXPRESSCLUSTER X > EXPRESSCLUSTER X 4.3 for Linux > Maintenance Guide

  • 2. The system maintenance information
  • 2.17 How to restore the mirror/hybrid disk from the disk image

4.1 Stop Failover Group

Stop the failover group.
Run the following command on the active server.

Example for running the command

> clpgrp -t failover
Command succeeded.

4.2 Run Pre-Processing Commands for Restore on Active/Standby Servers

Run the following commands on both active and standby servers.
* Commands are different for Windows and Linux.

Example for running the command (Windows)

> clprestore --pre
clprestore.bat : Changing the setting of cluster services to Manual Startup.
clprestore.bat : Shutting down...
Command succeeded.
clprestore.bat : Command succeeded.


Example for running the command (Linux)

# clprestore.sh --pre
clprestore.sh : Changing the setting of cluster services to Manual Startup.
clprestore.sh : Shutting down...
Command succeeded.
clprestore.sh : Command succeeded.

When running the above commands, EXPRESSCLUSTER services are set not automatically started. And then shut down the server.

4.3 Restore

Restore mirror disks on both active/standby servers.

4.4 Check Mirror Disk Settings

Start both active/standby servers and check the disk settings of the servers.
The procedures are different for Windows and Linux, so please check the appropriate procedures.

4.4.1 Check Mirror Disk Settings (Windows)

Start both active/standby servers and check the disk drive and EXPRESSCLUSTER settings.
Use "Disk Management" function of OS and reset the drive letters of the restored data partitions and cluster partitions to match the mirror disk resource settings.
* If the drive letters have not changed, explicitly reset it by changing it to a different drive letter and then reverting to the original drive letter.

Then launch the Cluster WebUI and check/reselect the cluster partition and the data partition of each server in the properties of the mirror disk resource on "Config Mode".
On the Details tab of the resource properties, select each server on the "Servers that can run the group", and then click the Edit.
On the Selection of partition, click the Connect to verify that the data partition and cluster partition are selected correctly, respectively. If not selected correctly, select the correct partitions and click the OK.
After checking, apply the configuration file.

4.4.2 Check Mirror Disk Settings (Linux)

Start both active/standby servers and check the paths of the restored cluster partition and data partition.
If the paths have changed, launch the Cluster WebUI, and specify the correct paths for the Data Partition Device Name and the Cluster Partition Device Name on the Details tab of the Resource Properties in the properties of the mirror disk resource from "Config Mode".
After checking, apply the configuration file.

4.5 Run Post-Processing Commands for Restore on Active/Standby Servers

Run the following commands on both active/standby servers.
* Commands are different for Windows and Linux.

Example for running the command (Windows)

> clprestore --post
clprestore.bat : Beginning backup-mode.
Command succeeded.
clprestore.bat : Changing the setting of cluster services to Auto Startup.
clprestore.bat : Rebooting...


Example for running the command (Linux)

# clprestore.sh --post
clprestore.sh : Changing the setting of cluster services to Auto Startup.
clprestore.sh : Rebooting...
Reboot server02 : Command succeeded.

After you run the command, EXPRESSCLUSTER services are set automatically started. And then reboot the servers.

4.6 Perform Mirror Recovery of Mirror Disk

Because the status of the mirror disk resource is abnormal after rebooting the servers, run the following command on the server where the failover group is running to stop the failover group.

Example for running the command

> clpgrp -t failover
Command succeeded.

Then, change status normal for the mirror disk on the server that you want to keep the data the latest. Run the following commands on the server where you want the data to keep the latest.
* Commands are different for Windows and Linux.


Example for running the command (Windows)

> clpmdctrl --force server01 md -s
Command succeeded.


Example for running the command (Linux)

# clpmdctrl --force md
Command succeeded.

Run the following command to launch the failover group on the server with the latest data.


Example for running the command

> clpgrp -s failover
Command succeeded.

Make sure that the data is latest and that the restore is complete. Finally, perform full copy for the mirror disk. Run the following command on the active server.


Example for running the command

> lpmdctrl --recovery md
Command succeeded.

Move the failover group to the server that was performed full copy to verify that you can successfully access the data.

Conclusion

This time, we introduced pre- and post-processing commands for backup/restore, which is one of the new features of EXPRESSCLUSTER X 4.3.
By running as the commands for some procedures of image backup/restore for mirror disk/hybrid disk, we can simplify the backup/restore and the commands prevent data from accidentally being mirrored while working.

If you consider introducing the configurations described in this article, you can perform a validation with the popuptrial module of EXPRESSCLUSTER. Please do not hesitate to contact us if you have any questions.