Recovery Data and Applications with Zerto – Part 2

The flexibility of Zerto Virtual Replication means that we have multiple options for data recovery depending on what’s specifically needed in each use case. ZVR enables data mobility by adding offsite cloning to the toolkit. You have the ability to restore specific files and folders. Now if a critical folder is inadvertently erased, the clock can be rewind by saving time and money.

JLFR -Journal Level File Restore is a powerful feature that extends Zerto’s protection features to allow recovery of individual files or folders. Restoring a file uses the same checkpoint system to facilitate point in time selection and recovery. Any files in the journal can be recovered with the journal sizing tool. JLFR requires NTFS or FAT and is thus Windows compatible only.

To restore a file, click on “Actions” and then on the “Restore File” button.

Photo Credits: Zerto.com
Photo Credits: Zerto.com

Select the ZFileServer and click on next

Photo Credits: Zerto.com
Photo Credits: Zerto.com

Files can be restored from the available checkpoints.

Photo Credits: Zerto.com
Photo Credits: Zerto.com

The disk need now to be mounted whether physical or virtual that stores the files or folders to recover. Only one disk at a time can be recovered.

Photo Credits: Zerto.com
Photo Credits: Zerto.com

After that, the mount process can start.

Photo Credits: Zerto.com
Photo Credits: Zerto.com

As usual, the running tasks will be shown running on the dashboard. There are few ways to start restoring files and folders from the mounted disk, including from the monitoring tab or the open folder icon on the right under the running tasks.

For example on the bottom, there is a tasks button.

Photo Credits: Zerto.com
Photo Credits: Zerto.com

The browse button allows you to search for the files and restore it. Once finish click on the unmount button.

Photo Credits: Zerto.com
Photo Credits: Zerto.com

Another feature is cloning – Cloning will create a copy of the virtual machines saved to a specific point-in-time checkpoint.

By selecting the VPG name from the VPG tab which will open the VGS’s name in another tab. Click on More then on offsite clone.

Photo Credits: Zerto.com
Photo Credits: Zerto.com

Once on the Offsite Clone tab, click on Select a checkpoint.

Photo Credits: Zerto.com
Photo Credits: Zerto.com

For example, by selecting the latest checkpoint and the name of the Datastore, we can start the cloning operation.

Another recovery option is the backup restore. This is done by clicking on Actions then on Restore Backup. Again from some options, few things need to be checked. By choosing the restore plan which is the name of the VRA, the restore point, VM settings and the Power On option.

Photo Credits: Zerto.com
Photo Credits: Zerto.com

And finally the Restore Button

Photo Credits: Zerto.com
Photo Credits: Zerto.com

Restoring from backup allowed you to leverage scheduled and unscheduled backups that extend the protection offered by the journal. Cloning extends ZVR by  giving you multiple copies of your machines as they looked at a very specific point in time. With the file restore feature, you can extend the functionality of ZVR across the full spectrum of disaster recovery options, ranging from recovery of an entire virtualized datacenter to recovery of just one single file.


SAR command daily tips and tricks

As promised on Twitter days back, I would post some interesting tips and tricks using the SAR (System Activity Report) linux command. The sar command writes to standard output the contents of selected cumulative activity counters in the operating system. The accounting system, based on the values in the count and interval parameters, writes information the specified number of times spaced at the specified intervals in seconds. If the interval parameter is set to zero, the sar command displays the average statistics for the time since the system was started.die.net 

Understanding SAR and its main configuration files

The SAR command is part of the sysstat package which is a multi-purpose analysis tool and it is useful to pin point specific issue related to CPU, Memory, I/O and Network. The command is really useful especially to plot the output on a graph for visual analysis and reporting. One example of such tool is GNUplot. To install GNUplot and SAR use the command yum install sysstat gnuplot. The configuration file of SAR is located at /etc/cron.d/sysstat and /etc/sysconfig/sysstat . If you would perform a rpm -ql sysstat | less , you would noticed that there are other binaries such as iostat,mpstat,pidstat etc.. that comes along with the package sysstat.

Difference between SA and SAR logs

In the directory /etc/cron.d/sysstat you would noticed that there is a cron which have been set up by default to run every ten minutes. The purpose is to write a log in the directory /var/log/sa . In this directory there are two type of files starting with sa and sar. SAR is the text file while SA is a binary. The sa file – Binary is updated every 10 minutes whereas the sar file is written at the end of the day. This parameter have been configured in the cron itself. By using the file command you would know which one is a binary or a text file.

To open the sa file, you need to use the command sar -f . Here is an example:

The /etc/sysconfig/sysstat file allows you to configure how long you want to keep the log, compression etc..

Some ways to use the SAR command

You can also visualize sar logs live using the sar command with the start and ending second. Let’s say you have run a command on the background or simply want to track the resource status for some seconds, you can use the command sar 1 3 Here is an example with the command

sar 1 3

Checking the load average, we apply the same principle but with the following command. The load average will also include load on each processor.

sar -q 1 3

To check for memory being consumed per seconds, use the following command

sar -r 1 3

To check number of memory coming in and out of the swap space, use the following command

sar -W 1 3

For the Disk I/O read write per seconds use the following command. Read/Write on disk also depend on the hardware

sar -b 1 3

For info about the CPU use the following

sar -u 1 3

To monitor the network activity in terms of packets in and out per interface received and compressed, use the following command

sar -n DEV 1 3

If the sar file has not been generated yet from the binary, you can use the following command, let’s say to convert it to a text in the /tmp directory.

sar -A -f  sa25 > /tmp/sar25

KSAR Graph with SAR logs

Now, in production environment, you need to to analyze for example at a specific time where memory or CPU was high. This can be done by means of a graph. I use the Ksar program. Ksar is a BSD-Licensed JAVA based application which create graph based on sar logs. You will need to install JAVA Runtime and launch the run.sh script to install the Ksar program. Once downloaded, just click on ‘Data’ and ‘Load from text file’. This is an example of swap usage

TIPS:

  • The SAR output by default is in 12 hour clock format. To make it become a 24 hour clock format edit the .bashrc file and insert the parameter alias sar=”LANG=C sar
  • GNUPlot is one another application to plot your information on a graph for better analysis.

Recovery Data and Applications with Zerto – Part 1

By doing a failover test with Zerto features, we know that in a real disaster or disruption, everything is configured correctly and working as expected. Because if we put our VMs in a VPG, an entire multi-VM application can be rigorously tested without any interruption to that same application in production.

By clicking on the Failover button on the right bottom, we can start a failover test. The VPG can be ticked and click on next to continue.

Photo credits: Zerto.com

The execution parameters are that which have been set up in the VPGs for example, boot sequence and checkpoint dates etc..  The Failover Test section is where you can start the Failover test.

The failover test creates VMs in a sandbox using the test network defined in the VPG settings. All testing is written to scratch volumes. The longer the test, the more space is consumed. At the end of the test, ZVR will power on the test VMs and do so in the correct boot order if one was specified.

The test will keep writing to scratch volumes until either:

  • The hard journal storage limit is reached
  • It’s manually stopped.

Photo credits: Zerto.com
Photo credits: Zerto.com

Since Zerto automates the test cleanup, you should only stop a test from within a vSphere client. In a live environment, you would then verify the results of the test in the recovery site and ensure each VM is performing as expected. Assuming a successful test, you can come back to the ZVM and click “Stop” under the running task section.

Photo credits: Zerto.com
Photo credits: Zerto.com

The report tab provides detail on the test ran. This can be used for confirmation of test success or failure and aid in compliance. The recovery reports can also be exported in PDF.

A live failover test can also be performed. This is an example from where you can toggle from test to live failover.

Photo credits: Zerto.com
Photo credits: Zerto.com

I have to choose the VPG and click on next

Photo credits: Zerto.com
Photo credits: Zerto.com

The i click on the checkpoint field to choose the date.

Photo credits: Zerto.com
Photo credits: Zerto.com

As mentioned the date can be choosen as well as a recovery can be performed from the latest backup.

Photo credits: Zerto.com
Photo credits: Zerto.com

You can also choose if you want to auto-commit, auto-rollback or none.

Auto-commit – Selecting Auto-Commit means that after a designated time (Default is 0 minutes), Zerto will commit the failover which promotes the failed over VMs to the new live production servers. Once the failover is committed, the DR servers will need to be failed back to production once the production site is restored to keep any changes made on the servers while failed over. To complete this, Reverse Replication will need to be enabled to replicate the changes from the target site back to the production site.

Auto-Rollback – The Auto-Rollback option allows you to designate a time after the Live Failover (Default 10 minutes) for the failover to be rolled back to production. This works similar to a Test Failover as you have a window to test your servers and applications and then undo the changes. This will also remove any changes that were made on the servers while at the DR site and does not require reverse replication.

Photo credits: Zerto.com
Photo credits: Zerto.com

NoneIf you set ‘None’ for the commit policy, you will have the option to either Rollback or Commit the failover later in time. This may be used in a situation where your production site is down, but could possibly be brought back online quickly. You have the option to commit the failover if you do not foresee a time production will be back online. However if the option is quickly fixed you can perform a Rollback.

After settings parameters in the “Execution Parameters” settings, the failover can start.

Photo credits: Zerto.com
Photo credits: Zerto.com

The sucessful failover test can be viewed on the dashboard. A move (or migration) is a more graceful operation than a failover since it is a planned outage It’s great for failbacks, preventive maintenance and site/hardware migrations. ZVM will gracefully powered down the VMs and then, as they are shutting down, grab the very latest copy of the data and use that instead of the journal. To move VPG, click on “actions” and “move VPG”

Photo credits: Zerto.com
Photo credits: Zerto.com

Then follow the same step by selecting the VPGs, but this time on the execution parameters, the VM need to be shutdown and click on “move”

Photo credits: Zerto.com
Photo credits: Zerto.com

After ZVR, has finished the commit and processed the VPGs, the move is done and we are back to the green circle which means the SLA has been met and the operation is successful.


Protecting Data and Applications with Zerto DRaaS

Zerto can be used to protect Data, Sites, Applications and Files. The best-in-class replication, orchestration and automation that ZVR provides is made by VPGs – Virtual Protection Groups. With Zerto, virtual machines are protected in  VPGs, which are a consistency grouping of VMs you want to protect and recover together. For example, a VPG for an application like Microsoft Exchange might include the VMs for the software, database and web server.

What is a VPG ?

  • Is complete application protection and recovery
  • VM and VMDK level consistency groups
  • Protects across servers and storage locations
  • Fully supports vMotion, Storage vMotion, HA and vApp
  • Journal-based point-in-time protection.
  • Works with Group Policy Protection
  • Has VSS Support

To create a VPG click on the VPG button which will list the VPGs from both the local and peer sites and provides summary details of each VPG. To create a new VPG, you have to click on the “New VPG” button.

Photo Credits: Zerto
Photo Credits: Zerto

This will bring you to the Create VPG wizard. Once you put a name for the new VPG click on next. Here is an example of the VPG wizard. On the VM’s tab, we are going to see a list of unprotected machine which is in the production site. Once you choose the VM, you click on the arrow in between and can also choose the boot order of each VMs. Then click next to move to the Replication tab.

Photo Credits: Zerto
Photo Credits: Zerto

The Replication tab covers details of the recovery/target site as well as the default value to use for the replication. If you have multiple site from the ZVM it can be selected in the Recovery Site option. The journal is a powerful feature. The journal is a dynamic record of every checkpoints in the history according to the values specify here. By default the value is one day and a journal is always on and stored on recovery site. If production is down, failovers are still possible by not writing changes locally first. The WAN traffic compression allows data to be compressed first before data is transmitted to the recovery site.

The ZVR journal is dynamic record of every checkpoint in a VM’s history. Checkpoints are inserted algorithmically and allow you to rewind to seconds, minutes or hours in the past to a max of 30 days. A journal is always on and only stored on the recovery site. If production is down, failovers are still possible and you also save storage space by not writing changes locally first.

Photo Credits: Zerto
Photo Credits: Zerto

The storage tab list the VM in the protection group and are associated with volumes details. If a VM is on thin provision during creation, ZVR uses that same thin provision or dynamic disk set up here by default. The “Edit Selected” button allows you to change this and to replicate swap disk if needed. Storage can also be moved from one datastore to another.

Photo Credits: Zerto
Photo Credits: Zerto

The recovery tab is for specifying defaults network and any post recovery scripts. You can specify the default recovery network and default recovery folder. For example:

Photo Credits: Zerto
Photo Credits: Zerto

The NICs tab allows you to specify specific network and IP settings for each of the recovery VMs. By default ZVR keeps the same MAC and IP addresses as the production site. So each VM need to be edited if  a different IP is needed.

Photo Credits: Zerto
Photo Credits: Zerto

The backup tab is turn off by default whereas the summary tab gives an overview of all the settings chosen.

Photo Credits: Zerto
Photo Credits: Zerto

You also create a repository for offsite backup. The repository is created by clicking on the Setup tab then on New repository.

Photo Credits: Zerto
Photo Credits: Zerto

As from here, you can click back on the backup tab from VPG and toggle the backup option ON.

Photo Credits: Zerto
Photo Credits: Zerto

Backup can also be run manually from the offsite backup menu. The offsite menu will appear once you activate it on the VPG backup menu.

Photo Credits: Zerto
Photo Credits: Zerto

Initial Configuration of ZVR – Zerto Virtual Replication

In the last article we have an overview of the basics of ZVR and its installation. We will now see how to install VRA – Virtual Replication Appliances as the first step of initial configuration. VRA sits on each ESXi host and performs always on block level replication. Zerto can also replicate on different hypervisors. During installation of ZVM or VRA, there is absolutely no downtime. Here is an example of a Production and Recovery site showing where the ZVM and VRA is located.

Photo Credits: Zerto.com
Photo Credits: Zerto.com

A VRA is simply a virtual machine that is installed alongside the virtual machines on the host. It is a custom 64-bit Debian version of Linux and is designed for security and a small footprint in terms of disks, memory and CPU. Exact requirement for VRA installation varies depending on the hypervisor. Here is the requirement:

Photo credits: Zerto.com
Photo credits: Zerto.com

The following information are needed before installation of VRA.

  • The network to be used for replication
  • The IP address, Subnet Mask, Default Gateway (When using static and not DHCP)
  • The network settings to access the peer site

Whilst installing VRA, SSH will be enable on the host and will be disabled automatically after installation. Once you connect to the ZVM main dashboard with the IP address on port 443, click on set up to begin the installation process.

Photo Credits: Zerto.com
Photo Credits: Zerto.com

Each time a VRA is installed, you need to click on New VRA. The idea is to choose the host and installed the VRA on each HOST. It is also recommended to use static IP for the VRA Network details. Details such as the datastore, network, V Ram (The amount of RAM determines the maximum buffer size for the VRA when buffering IOs ) should be entered before the installation as follows:

Photo Credits: Zerto.com
Photo Credits: Zerto.com

Once installation process started, the  VRA Status will be on mode “installing”. The alert notification on bottom left can be clicked. An alert that could be prompted could be “Host xxx.xxx.xx.xx has no VRA installed”. Zerto API can also be used to automate the process for installation of VRAs. Once the VRA’s installed on each host, its important to paired with the Recovery site by repeating the same process on the production site.

There is two way to pair with a disaster recovery site. One when login to the ZVR console, it will prompt a licence to pair with which should that of the recovery site or a manual pairing can be done when already connected by clicking on Sites -> Pair and click on the Pair button

Photo Credits: Zerto.com
Photo Credits: Zerto.com

After pairing from source to recovery site, it is to be noted that no replication is happening yet. By setting up Virtual Protection Groups (VPGs) we can start tracking block-level changes and replication across the two sites.