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

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

问题描述

我的数据库保存在/mnt,使用 ec2 实例附带的临时存储.要使用 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天全站免登陆