复制linode镜像
2011-02-06 17:18
92 查看
Copy a Disk Image Over SSH
Published: August 13, 2009 by Phil ParadisIf you'd like to copy a Linode's disk image to a system that resides on a different network, you can easily do so using SSH and a Finnix configuration profile. This may be useful in cases where you'd like to periodically make complete offsite images of your Linode's disk image for backup/archival purposes.In this example, we'll be copying a Linode's disk image to a local system over SSH. You'll need to make sure your receiving environment has ssh installed (most Linux/Unix-like systems have it installed by default). If you're running Windows locally, you may wish to set up the Cygwin
compatiability layer to provide a reasonably complete Unix-like environmnet.
These instructions work with the Linode platform. If you don't have a Linode yet, sign up for a Linux VPS and get started today.
ContentsCreate a Finnix Boot ProfileCopy the Disk ImageLicense
Create a Finnix Boot Profile
Under your Linode's "Dashboard" tab, click "Create a new Configuration Profile".Create a configuration profile for Finnix using the values shown below. In this example, we've mounted our Linode's disk image on /dev/xvdb. Once you've selected the correct values, click "Save Profile" to continue.
Use the "Reboot" button for the Finnix Recovery profile to boot into the Finnix environment.
On the "Console" tab in the Linode Manager, click "AJAX Console" and you'll be presented with the Finnix environment.
Set the root password and start the SSH server:
passwd /etc/init.d/ssh start
Copy the Disk Image
Issue the following command to start copying your disk image to the receiving machine. Replace "archive" with an appropriate values for your receiving machine's configuration (this example assumes your local username is "archive"). Replace "12.34.56.78" with your Linode's IP address.ssh root@12.34.56.78 "dd if=/dev/xvdb | cat" | dd of=/home/archive/linode.imgYou'll be presented with output similar to the following session excerpt. Note that it may take a long time to copy your disk image to the receiving machine.
The authenticity of host '12.34.56.78 (12.34.56.78)' can't be established. RSA key fingerprint is 39:6b:eb:05:f1:28:95:f0:da:63:17:9e:6b:6b:11:4a. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '12.34.56.78' (RSA) to the list of known hosts. root@12.34.56.78's password: 4096000+0 records in 4096000+0 records out 2097152000 bytes (2.1 GB) copied, 371.632 seconds, 5.6 MB/s 4096000+0 records in 4096000+0 records out 2097152000 bytes (2.1 GB) copied, 364.002 s, 5.8 MB/sOnce the copy job has completed, you may wish to verify it by mounting the image on your receiving machine. You may do so as follows (on the receiving machine, named "backupbox" in this example):
archive@backupbox:~$ mkdir linode archive@backupbox:~$ su Password: backupbox:/home/archive# mount -o loop linode.img linode backupbox:/home/archive# ls linode/ bin dev home lost+found mnt proc sbin srv tmp var boot etc lib media opt root selinux sys usrCongratulations! You've successfully transferred your Linode's disk image to another host over the Internet using SSH.
License
This guide is licensed under a Creative Commons Attribution-No Derivative Works 3.0 United States License. Please feel free to redistribute unmodified copies of it as long as attribution is provided, preferably via a link to this page.
http://library.linode.com/linode-platform/migration/copy-disk-image-over-ssh
相关文章推荐
- AS3复制图形镜像
- image1载入大图片时如果stretch=true,image1会显示出大图片的缩图,那么如何将这个缩图镜像复制一份赋值给另一个image2的picture呢?
- 制作能自动安装的CentOS镜像文件[复制链接]
- sql server 复制,镜像,日志传输及故障转移集群区别
- AS3复制图形镜像
- 问题:Virtual Box如何复制镜像
- 复制、备份、镜像的联系与区别
- 快照 镜像 复制
- 事务复制和镜像共存性的测试
- docker 镜像仓库 Harbor 部署 以及 跨数据复制
- SQLServer 复制和数据库镜像 详细配置部署
- image1载入大图片时如果stretch=true,image1会显示出大图片的缩图,那么如何将这个缩图镜像复制一份赋值给另一个image2的picture呢?
- 阿里云镜像 创建,共享,复制
- sql server 复制,镜像,日志传输及故障转移集群区别
- 事务复制和镜像共存性的测试
- Docker镜像的复制和重载
- 事务复制发布故障转移到镜像
- Linux内核实现多路镜像流量聚合和复制
- Linux内核实现多路镜像流量聚合和复制的方法
- sql server 复制,镜像,日志传输及故障转移集群区别