Skip to main content
Version: v11.9.4

Dehydration and Rehydration


This process is used to rotate instances periodically or for disaster recovery when WME data(/wm-data and /wm-runtime in directory/volumes Platform Instance) is available but machines are corrupted and make sure have to use the same WME version for the recovery process.

Data Storage in WME

  • WaveMaker Platform Stores its state into the disk. WaveMaker Platform administrators can take backups of those disk/directories and can restore them to any previous state.
  • WaveMaker uses separate dedicated directories /wm-data and /wm-runtime in WaveMaker Platform Instance for storing data.

What Data needs to be Backup in WME Instances

  • The /wm-data directory and /wm-runtime directory in Platform Instance.
  • The /data directory in all the StudioWorkspace/AppDeployment Instances are not required to be backup because, we passivating all the Insatnce containers.
  • Take backup/snapshots above volume/directories periodically.

How to move all the data to a single location

  • We can move all the data to Platform Instance(/wm-data dir or volume) so that backup will be easier. In that case, no need to take backups of any (volume/dir) in any of StudioWorkspace Instance / AppDeployment Instance.
  • Before applying the backup process do Hibernation and passivation for user and application containers, this can be done from the launchpad.

Passivate Containers in StudioWorkspace/AppDeployment Instances

  • To upgrade your operating system it is highly recommended to passivate all the containers in StudioWorkspace/AppDeployment Instances
  • It can be done in following way.

Launchpad

  • After logging into launchpad in WME setup go to Developer/Deployment Workspace, and then go to the container as shown in the below image

  • Select the containers that are running, hibernate those containers one after the other by hitting the stop button as shown in the image below, and wait till the state is changed to stop.

    stop_conainers

  • After logging into launchpad in WME setup go to Developer Workspace, and then go to capacity as shown in the below image

    instance_passivate

    • Here select all the StudioWorkspace instances one by one and do the below operations

      • First hit the stop button present there, it will stop the instances from taking new user containers, wait till the state of Instance is changed to STOPPED
      • Then you need to hit the passivate button, this will passivate all the stopped containers in the instance selected, wait till there are no stopped instances present in the instance
      • After this is done in all StudioWorkspace instances cross-check the running containers in the containers tab, all the containers should be in the passivated state
  • After completed the above process in Developer Workspace, go to AppDeployments, and perform the same operation mentioned above in all AppDeployment Instances(Demo, Stage, Live)

Stop the WME Setup

  • We recommend you to stop the WME setup before proceeding for further steps
  • You can stop the WME setup operation from the config wizard portal
  • CW Portal

    • Log in to the CW portal, after login in home page you can see the stop button as shown in the image below, hit the stop button to stop the WME setup

    cw_stop

How to take a backup of the data

  • Take a backup of the /wm-data and /wm-runtime directories of Platform Instance by taking a snapshot of a volume.
  • For the disaster and recovery process take a backup of the /data directory of StudioWorkspace Instance / AppDeployment Instance by taking snapshots.

AWS

Azure

GCP

VMWARE ESXi and Hyper-V

  • Use the below steps for taking /wm-data backup in Platform Instance, it will create data.tar in /wm-data location.
bash wme-installer.sh --data-archive
  • Copy the generated data.tar to secure location on new WME Platform Instance or to any cloud storage services.

Data restore

Platform Instance

  • Launch the instance or VM with the same IP address with the latest AMI Image. To create WME Platform Instance in the different cloud and on-premise environments please follow the below steps attach the /wm-data and /wm-runtime volumes to Platform Instance and Mount the volume to the platform Instance using the following command.
  • Make sure have to attach backup /wm-data and /wm-runtime volumes to Platform Instance.

AWS

AZURE

GCP

VMWARE ESXI

Hyper-V

Volumes Based Disks Restoring(AWS, GCP, Azure)

mount /dev/</wm-data disk> /wm-data
example: mount /dev/xvdh /wm-data
  • Update the fstab entry for volume on every system reboot, add an entry for the device to the /etc/fstab file.
  • Take the UUID of disks for identification by using the following command.
blkid
  • To entry, the UUID of the disks in fstab, use the following format.
UUID=</wm-data block-device-UUID>  /wm-data   ext4   defaults ,nofail  0  2

Directory based Disks Restoring(VMWARE ESXi and Hyper-V)

  • Copy tar which was archived in the previous steps
  • Use the below steps for restore /wm-data using data.tar which was archived in previous steps in Platform Instance,
bash wme-installer.sh --data-untar

data_untar

StudioWorkspace Instance / AppDeployment Instance

Download and Extract Migrations

  • To download migration tar which will be shared by the WaveMaker team, please run the following command
    wget <WME-Migration-Link>
  • Extract wme_migrations to /usr/local/content/wme/wme-installer/< version>/resources folder, for extract the content run the following command
    sudo tar xvf <WME-Migration-Filename> -C /usr/local/content/wme/wme-installer/<version>/resources/
  • To Rotate the Instances, it is required some Rotation related files and to download these which will be shared by the WaveMaker team, please run the following command
    wget <WME-Rotate-Scripts-link>
  • Extract the wme_rotations to /usr/local/content/wme/wme-installer/< version >/resources folder, for extract the content run the following command
    sudo tar -xvf  <WME-Rotate-sCripts-Filename> -C /usr/local/content/wme/wme-installer/<version>/resources/

Installing WME on New Instance

note

After Completing the WaveMaker Initialization process, please go with the migrations step which is given below before proceeding with the Configwizard

Run the required migrations

  • As we we migrating from WME 10.13.x to WME 11.x, we have to run few migrations on gitlab and postgres
  • Execute Below command to copy wme rotation script to installer location
    cp /usr/local/content/wme/wme-installer/<version>/resources/wme-rotate.sh /usr/local/content/wme/wme-installer/<version>/ 
  • Execute Below command to run Gitlab and Postgres Migration
    bash /usr/local/content/wme/wme-installer/<version>/wme-rotate.sh –migrate

Run Sync Operation

  • After completing the above steps, run the Sync from the configwizard portal by following steps

    • Login to the config portal using the same password that was used in earlier setup
    • After login in home page you can see settings icon on the top right as marked below, it takes you to the CW settings place

    cw_stop

    • Go to the Danger Zone and hit the Sync button and perform the next configuration steps

    cw_stop

Replace StudioWorkspace/AppDeployment Instances

Update VCS IP’s in Passivation Disk and Database

  • Run below scripts in the WME platform Instance to change the IP in Database and the Backserver disk

    • Change IP in Database entries

      sudo bash executesql.sh update_vcs_ips_in_db.sql  <old_vcs_ip>  <new_vcs_ip>
    • Change IP in backupserver disk

      sudo bash update_vcs_ips_in_backupserver.sh <old_vcs_ip>  <new_vcs_ip>