如何在ebs快照中备份数据?

时间:2021-07-10 19:14:20

My company has a disaster recovery requirement, this requirement considered AWS failure, such as AWS is unusable for some reason, we will need to be able to quickly restore our application in other cloud providers, like Azure.

我的公司有一个灾难恢复要求,这个要求被认为是AWS失败,例如由于某些原因AWS无法使用,我们需要能够在其他云提供商(如Azure)中快速恢复我们的应用程序。

Currently our solution is

目前我们的解决方案是

  1. taking snapshot of ec2 instance where our application is running regularly, these snapshots are the basic backup stored in AWS (invisibly on S3).
  2. 获取定期运行应用程序的ec2实例的快照,这些快照是存储在AWS中的基本备份(在S3上无形)。
  3. Take the latest snapshot at 0 am every day, and create a EBS volume
  4. 每天凌晨0点拍摄最新快照,并创建一个EBS卷
  5. Create a temporary EC2 instance
  6. 创建临时EC2实例
  7. Attache and Mount the volume created in step 2 to the instance created in step 3.
  8. 将步骤2中创建的卷附加并挂载到步骤3中创建的实例。
  9. Tar the files on the instance, and upload to s3 (we have some magic tools to copy files in specific bucket to Azure.).
  10. tar实例上的文件,并上传到s3(我们有一些神奇的工具可以将特定存储桶中的文件复制到Azure。)。
  11. Delete the volume and terminate the instance.
  12. 删除卷并终止实例。

This solutions works, but it has some problem, is there any other better way to complete this requirement?

这个解决方案有效,但它有一些问题,有没有其他更好的方法来完成这个要求?

2 个解决方案

#1


1  

If you have automated the steps (AWS CLI would suffice) then your solution is simple and effective, the only simpler thing would be to just tar the files on the source instance but that could impact whatever service it's providing.

如果您已经自动化了这些步骤(AWS CLI就足够了),那么您的解决方案简单而有效,唯一更简单的方法就是对源实例上的文件进行tar操作,但这可能会影响它提供的任何服务。

Microsoft's solution would be to use Azure Site Recovery:

Microsoft的解决方案是使用Azure Site Recovery:

https://docs.microsoft.com/en-us/azure/site-recovery/site-recovery-migrate-aws-to-azure

https://docs.microsoft.com/en-us/azure/site-recovery/site-recovery-migrate-aws-to-azure

#2


0  

If you are expecting an AWS outage, isn't it non effective to assume that you will be able to create another instance and restore your snapshot? I mean, if that's the case, why don't you just keep running on AWS?

如果您预计AWS中断,假设您可以创建另一个实例并恢复快照并不是无效的吗?我的意思是,如果是这样的话,为什么不继续在AWS上运行?

I think your snapshot policy is OK to prevent EC2 failures, but not AWS. To cover the second case, backup your data to S3 and copy it periodically to Azure.

我认为您的快照策略可以防止EC2失败,但不能防止AWS。要涵盖第二种情况,请将数据备份到S3并定期将其复制到Azure。

You will have extra data transfer costs (and they can get huge) but it's the safer way to ensure that you won't have to wait AWS gets back (how long could it take?) to move your data.

您将获得额外的数据传输成本(并且它们可能会变得巨大),但这是确保您不必等待AWS返回(需要多长时间?)来移动数据的更安全的方法。

#1


1  

If you have automated the steps (AWS CLI would suffice) then your solution is simple and effective, the only simpler thing would be to just tar the files on the source instance but that could impact whatever service it's providing.

如果您已经自动化了这些步骤(AWS CLI就足够了),那么您的解决方案简单而有效,唯一更简单的方法就是对源实例上的文件进行tar操作,但这可能会影响它提供的任何服务。

Microsoft's solution would be to use Azure Site Recovery:

Microsoft的解决方案是使用Azure Site Recovery:

https://docs.microsoft.com/en-us/azure/site-recovery/site-recovery-migrate-aws-to-azure

https://docs.microsoft.com/en-us/azure/site-recovery/site-recovery-migrate-aws-to-azure

#2


0  

If you are expecting an AWS outage, isn't it non effective to assume that you will be able to create another instance and restore your snapshot? I mean, if that's the case, why don't you just keep running on AWS?

如果您预计AWS中断,假设您可以创建另一个实例并恢复快照并不是无效的吗?我的意思是,如果是这样的话,为什么不继续在AWS上运行?

I think your snapshot policy is OK to prevent EC2 failures, but not AWS. To cover the second case, backup your data to S3 and copy it periodically to Azure.

我认为您的快照策略可以防止EC2失败,但不能防止AWS。要涵盖第二种情况,请将数据备份到S3并定期将其复制到Azure。

You will have extra data transfer costs (and they can get huge) but it's the safer way to ensure that you won't have to wait AWS gets back (how long could it take?) to move your data.

您将获得额外的数据传输成本(并且它们可能会变得巨大),但这是确保您不必等待AWS返回(需要多长时间?)来移动数据的更安全的方法。