August 18, 2019 Vignesh Sathiyanantham 0Comment

In my previous blog, I discussed how to set up the ZFS File system in Ubuntu 18.04 and setup ZVOL for Microsoft SQL Server Databases

In this post let’s discuss on how to set up the Disaster recovery plan for the Microsoft SQL Database with the ZFS replication,

For that, I set up the Ubuntu 18.04 Instance in us-east-1 in availability zone us-east-1c , and ssh into the instance using the pem file

Then I followed my post on ZVOL for MS SQL Database to install the ZFS on the AWS Linux Instance

And then with the new volume, I create a new ZPOOL on the AWS Instance for storing the replicated data from the On-Premise

In amazon my second disk is xvdb

ubuntu@ip-172-31-91-161:/dev$ sudo zpool create aws-pool /dev/xvdb
ubuntu@ip-172-31-91-161:/dev$
ubuntu@ip-172-31-91-161:/dev$ zpool list
NAME       SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
aws-pool  15.9G   272K  15.9G         -     0%     0%  1.00x  ONLINE  -
ubuntu@ip-172-31-91-161:/dev$

Then I enabled the password access for the AWS Instance, refer this link to enable password authentication to AWS Linux Instance

Then I executed the ZFS Send / Receive command to replicate the Snapshot to AWS Cloud

root@vigneshzfs:/home/vignesh# sudo zfs send sql-pool/disk1@aug18 | ssh ubuntu@100.27.28.225 zfs recv aws-pool/sql-pool-aug18
ubuntu@100.27.28.225's password:
root@vigneshzfs:/home/vignesh#

I was using non-root account so I need to add permission to the users which perform the send and receive, refer this blog post for the permission required for those

with these steps, I replicated the backup to the AWS Cloud.


Also published on Medium.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.