如何备份AWS EC2实例/临时存储的备份? [英] How do I take a backup of aws ec2 instance/ephemeral storage?

查看:529
本文介绍了如何备份AWS EC2实例/临时存储的备份?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用ec2实例附带的临时存储将数据库保存在/ mnt。要使用ec2 api工具进行备份,我们需要一个卷ID,但是在aws控制台中,我只能找到8gb根存储的卷ID。

I have my db kept at /mnt, using ephemeral storage that comes with ec2 instance. To take the backup using ec2 api tools we need a volume id, but in the aws console I can find the volume id of only the 8gb root storage.

如果要备份临时存储该怎么办?

What should I do if want the backup of ephemeral storage? Is there any alternative for backing up instance storage?

推荐答案

首先,您应该永远不要存储任何持久值在 Amazon EC2 中的临时存储上,除非您确切知道自己在做什么和准备随时进行时间点备份等。-您的问题似乎表示您可能对于临时存储的概念有所误解, Amazon EC2实例存储 Amazon EBS 及其对数据安全性和备份要求的重大影响:

First and foremost, you should never store anything of lasting value on ephemeral storage in Amazon EC2, except if you know exactly what you are doing and are prepared to always have point in time backups etc. - your question seems to indicate that you might be mistaken about the concept of ephemeral storage, the respective difference between Amazon EC2 Instance Storage an Amazon EBS and the significant implications regarding data safety and backup requirements:

临时存储在停止/启动周期会丢失通常可以消失,因此您绝对不希望在其中放置任何持久的价值,即仅在其中放置您可以承受得起的轻松丢失或重建的临时数据,例如交换文件或在计算过程中使用的严格临时数据。当然,例如,您可能在那里存储了巨大的索引,但是必须出于任何原因(实例重新启动,硬件故障等)清除存储之后,必须准备好重建这些索引。

Ephemeral storage will be lost on stop/start cycles and can generally go away, so you definitely don't want to put anything of lasting value there, i.e. only put temporary data there you can afford to lose or rebuild easily, like a swap file or strictly temporary data in use during computations. Of course you might store huge indexes there for example, but must be prepared to rebuild these after the storage has been cleared for whatever reason (instance reboot, hardware failure, ...).

  • That's one of the many reasons Eric Hammond excellently summarized in You Should Use EBS Boot Instances on Amazon EC2), which outlines the history of and differences between the two storage concepts and assesses the few remaining possible benefits of ephemeral storage (mainly being plentiful and free).

这些说明应阐明为什么您无法备份临时存储卷具有仅适用于EBS卷(即EBS快照)的机制。因此,您可以通过选择的常规操作系统级备份工具来备份前者,其中 Duplicity 很受欢迎例如,选择可以方便地 Amazon S3 ,正如我对最容易在实时Linux服务器上使用备份软件

These explanations should clarify why you are unable to backup the ephemeral storage volumes with a mechanism that solely applies to EBS volumes (i.e. EBS snapshots). Accordingly, you can backup the former via regular operating system level backup tool of your choice, with Duplicity being a popular choice optionally facilitating Amazon S3 for example, as addressed in my answer to Easiest to use backup software for live linux server.

这篇关于如何备份AWS EC2实例/临时存储的备份?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆