Skip to main content
Version: v10.15

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 and /data directory/volume in StudioWorkspace Instance / AppDeployment 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 directory /wm-data in WaveMaker Platform Instance for storing data and /data in StudioWorkspace Instance / AppDeployment Instance.

What Data needs to be Backup in WME Instances

  • The /wm-data directory in Platform Instance.
  • The /data directory in all the StudioWorkspace/AppDeployment Instances are required to be backup.
  • 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 in either by executing a command from the command line or launchpad.

Passivate Containers in StudioWorkspace/AppDeployment Instances

  • To upgrade your operating system it is recommended to passivate the containers in StudioWorkspace/AppDeployment Instances
  • It can be done in two different ways

Launchpad

  • After logging into launchpad in WME setup go to Developer 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.

    instances_verification

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

    developer_workspace

    • 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 making sure all containers are passivated come back to capacity and select one by one Instances and hit the delete icon as shown below, this will delete the instance from the setup

    delete_instances

  • 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)

Command Line

  • You can execute the below command in Platform Instance, it will passivate all the container and will delete StudioWorkspace/AppDeployment instances in the setup

    python3 /usr/local/content/wme/wme-installer/<version>/resources/python/3/passivation_deletion.py -pr <protocol> -d <domain> -u <adminUser> -p <adminPasswd> -di True
    • protocol represents what web protocol is used to connect to WaveMaker application (http/https)

    • domain represents the domain name in which WaveMaker application is running

    • adminUser and adminPasswd refer to the admin credentials which are used to access launchpad.

    • Refer below mentioned example command for passivation

    python3 /usr/local/content/wme/wme-installer/10.7.1/resources/python/3/passivation_deletion.py -pr http -d wme-demo.wavemaker.com -u test@wavemaker.com -p test-password -di True

Stop the WME Setup

  • We recommend you to stop the WME setup before proceeding for further steps

  • You can stop the WME setup operation either by executing commands at the command line or from the config wizard portal

    • Command Line

      • Use the following command to stop the WME setup in Platform Instance. You need to ssh to the Instance and need to have root privileges to execute the below script.
      bash /usr/local/content/wme/wme-installer/<version>/wme-installer.sh --stop
    • 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 directory 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 volume to Platform Instance and Mount the volume to the platform Instance using the following command.
  • Make sure have to attach backup /wm-data volume 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

Installing WME on New Instance