如何用另一个root ebs卷替换root ebs卷? [英] How to replace root ebs volume with another root ebs volume?
问题描述
我不小心格式化了系统,并且ec2卷的访问密钥也被删除了.因此,我停止了实例并分离了ebs卷.
但是我无法将它作为root(/dev/sda1)附加到另一个ec2实例.任何人都可以指导我完成它吗?我所有的数据和服务器文件都在该卷中.
我安装了第一个ebs卷,并在第二个实例上浏览了其中的文件.它们都完好无损.如果无法将其作为根卷挂载,则我需要一种从该卷中获取所有mysql数据的方法,因为其中托管了许多wordpress网站.我可以访问wordpress文件,但我不知道如何从实例中获取数据库.
任何解决方案都可以挽救我的生命...
非常感谢
I accidentally formatted my system and the access keys to the ec2 volume were also deleted. So I stopped the instance and detached the ebs volume.
However I am not able to attach it to another ec2 instance as root(/dev/sda1). Can anyone please guide me through it? All my data and server files are there in the volume.
I mounted the first ebs volume and on the 2nd instance and browsed the files in there. They are all intact. If it cannot be mounted on as root volume, I need a way to get all the mysql data from the volume as there are a number of wordpress websites hosted on it. I can access the wordpress files but I dont know how to get the database from the instance.
Any of the solutions will save my life...
Thank you very much
推荐答案
您需要做什么:
- 停止实例
- 分离当前的根EBS
- 在
/dev/sda1
(对于Linux)和/dev/xvda
(对于Windows)下为您添加新的EBS - 启动实例
- Stop the instance
- Detach the current root EBS
- Attach you new EBS under
/dev/sda1
(for Linux) and/dev/xvda
(for Windows) - Start your instance
从技术上讲就是这样.如果出现问题,您始终可以将EBS附加为非根目录的EBS(例如/dev/sdb
)并浏览文件并在可能的情况下修复错误.
Technically that's it. In case of problems, you can always attach the EBS as non-rooted EBS (such as /dev/sdb
) and browse the files and fix the error if possible.
这篇关于如何用另一个root ebs卷替换root ebs卷?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!