遵循Linode的Copy a Disk Over SSH
指南:
ssh [email protected] "dd if=/dev/sdX " | dd of=/PathToLocalLocation/server.img
xx.xx.xxx.xx
是你服务器的IP,sdX
- X
代表你的驱动器指定的字母,你也必须说明image
的名字= server.img
我遇到了这个问题(在我的本地计算机上):
bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
我进行了长时间的搜索,结果很多,这些结果都不适用于Lish
,也不是一个完整的解决方案。
无论我做什么,我都无法在locales
上设置Lish command line
....所有答案都是关于本地或服务器上的command-line
,而不是rescue-mode
....想法?
尝试和错误与不同的答案,我想出了这个解决方案(在Lish
,而服务器在rescue-mode
):
echo "LC_ALL=en_US.UTF-8" >> /etc/environment
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf
locale-gen en_US.UTF-8
上一个命令导致以下错误:
locale-gen: command not found
这是你需要做的(仍然在Lish
):
apt-get clean && apt-get update
apt-get install locales
locale-gen en_US.UTF-8
Generating locales (this might take a while)...
en_US.UTF-8... done
Generation complete
你很高兴...将服务器的磁盘复制到本地计算机上。