我有一个新客户,以前的开发人员已经在Amazon/EC2上的网站上留下了她的高度和干爽。他持有这个例子的私钥,尽管她可以完全访问Amazon控制面板(她每周支付300美元/月的价格购买一个拥有大约3名访问者的网站),但她没有任何办法将自己的内容删除并转移到新的主机上。
我对AWS不熟悉,也不知道该如何帮助她。站点的组/文件权限在服务器上搞砸了,因此通过她的WordPress控制面板导出内容/数据库是行不通的。
有什么办法帮她吗?谢谢!
发布于 2018-10-26 04:47:18
你有两个选择:
/dev/xvda或/dev/sda1。记下来。然后在根卷名称上悬停时,单击弹出框中的卷id,例如vol-1234abcd1234abcd。vol-1234abcd1234abcd,然后从菜单中选择“分离卷”。1. Now _Attach_ the same volume to the new EC2 instance that you've got access to.
2. _SSH_ to the new instance and `sudo su -` to get `root` privileges.
3. _Mount_ the webserver volume, it will probably be `/dev/sdf1` or `/dev/xvdb1` - check `dmesg | tail -n10` to get a hint of what the disk name is. [root@ip-... ~] # mount /dev/xvdb1 /mnt
4. Copy the contents of `/home/ec2-user/.ssh/authorized_keys` to `/mnt/home/ec2-user/.ssh/authorized_keys` - make sure the file permissions and ownership are still the same as they were! [root@ip... #] cat /home/ec2-user/.ssh/authorized\_keys > /mnt/home/ec2-user/.ssh/authorized\_keys
- At the same time you may want to _copy out_ the contents of your _WordPress website_ and the _database files_ (if the DB is on the same instance). 1. `umount /mnt` from the shell and then _Detach_ the volume from the AWS Console.
2. Now _Attach_ it back as the _Root volume_ to the old webserver instance.
- Note that the _Root volume_ name won't be in the menu! Simply write what you noted down in step 1 above, e.g. `/dev/xvda` or `/dev/sda1`.1. _Start_ the instance.如果出了问题,这里是如何在上面的第4步采取从快照恢复根文件系统。
那应该行。希望有帮助:)
https://serverfault.com/questions/937266
复制相似问题