Difference between revisions of "Cloning"
(introduce an article for cloning DO droplet) |
(New page: Once you have backups, you can and should test the ability to restore those backups to a new hardware environment. The restore procedure is going to depend on what you used to create ...) |
||
(8 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
Once you have [[backups]], you can and should test the ability to restore those backups to a new hardware environment. The restore procedure is going to depend on what you used to create your "image" in the first place. Independent of the notion of backups, a system administrator (or even an experienced user) will want to "clone" a computer system. That is make an identical copy or nearly identical copy of a computer on different hardware. The most widespread use-case for this is when a person gets a new computer and wants to migrate the old computer software and data to the new hardware. From the system administrator's perspective, the common use case is different: it's when you have to build out a cluster, provide redundancy, or otherwise scale a hardware/software platform. | Once you have [[backups]], you can and should test the ability to restore those backups to a new hardware environment. The restore procedure is going to depend on what you used to create your "image" in the first place. Independent of the notion of backups, a system administrator (or even an experienced user) will want to "clone" a computer system. That is make an identical copy or nearly identical copy of a computer on different hardware. The most widespread use-case for this is when a person gets a new computer and wants to migrate the old computer software and data to the new hardware. From the system administrator's perspective, the common use case is different: it's when you have to build out a cluster, provide redundancy, or otherwise scale a hardware/software platform. | ||
− | Consider all the times that you could produce a system that you wish to replicate. For example, a standard "Developer's Workstation" or "Designer's Studio" or "Student Desktop" and many more technical varieties like "Web Front-end", "Mail Relay" etc. | + | Consider all the times that you could produce a system that you wish to replicate. For example, a standard "Developer's Workstation" or "Designer's Studio" or "Student Desktop" and many more technical varieties like "Web Front-end", "Mail Relay" etc. |
− | + | == Apt-get --set-selections == | |
− | |||
− | == | ||
One way to do this on Debian-based systems (including Ubuntu) is to use <code>dpkg</code> get/set-selections in combination with <code>apt-get</code> using it's dselect-upgrade option: | One way to do this on Debian-based systems (including Ubuntu) is to use <code>dpkg</code> get/set-selections in combination with <code>apt-get</code> using it's dselect-upgrade option: | ||
Line 13: | Line 9: | ||
the following: | the following: | ||
− | ===on System A=== | + | === on System A === |
<source lang="bash"> | <source lang="bash"> | ||
sudo dpkg --get-selections > package-list.txt | sudo dpkg --get-selections > package-list.txt | ||
Line 19: | Line 15: | ||
copy package-list.txt from System A to System B | copy package-list.txt from System A to System B | ||
− | ===on System B=== | + | === on System B === |
<source lang="bash"> | <source lang="bash"> | ||
sudo dpkg --set-selections < package-list.txt | sudo dpkg --set-selections < package-list.txt | ||
Line 25: | Line 21: | ||
</source> | </source> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
There are other tools to do the job too, and the tools you want to use for this depend on how automated you aim for this task to be, and how much you need/want to be able to customize each machine as it's being installed. | There are other tools to do the job too, and the tools you want to use for this depend on how automated you aim for this task to be, and how much you need/want to be able to customize each machine as it's being installed. | ||
− | ==KickStart== | + | == KickStart == |
'''[http://fedoraproject.org/wiki/Anaconda/Kickstart Kickstart]''' is a Red Hat package that deploys Red Hat to multiple installation targets with minimal customisation. Aside from the wiki, it is also covered in [http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5.3/html/Installation_Guide/index.html the Installation Guide for RedHat Enterprise Linux] | '''[http://fedoraproject.org/wiki/Anaconda/Kickstart Kickstart]''' is a Red Hat package that deploys Red Hat to multiple installation targets with minimal customisation. Aside from the wiki, it is also covered in [http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5.3/html/Installation_Guide/index.html the Installation Guide for RedHat Enterprise Linux] | ||
− | ==System Imager== | + | == System Imager == |
SystemImager is a third-party tool that does a better job. http://systemimager.org/ | SystemImager is a third-party tool that does a better job. http://systemimager.org/ | ||
− | ==Fully Automated Install== | + | == Fully Automated Install == |
'''[http://www.informatik.uni-koeln.de/fai/ fai]''' (fully automated install) is a Debian-based tool to do likewise. Like System Imager, it's suitable for building clusters. See the | '''[http://www.informatik.uni-koeln.de/fai/ fai]''' (fully automated install) is a Debian-based tool to do likewise. Like System Imager, it's suitable for building clusters. See the | ||
+ | * [http://www.informatik.uni-koeln.de/fai/ project website] and the | ||
+ | * [http://faiwiki.informatik.uni-koeln.de/index.php/Main_Page wiki]. | ||
+ | * [http://www.slideshare.net/henningsprang/automated-installations-and-infrastructure-management-with-fai-presentation presentation] | ||
+ | * [[:Media:Fai_poster_a4.pdf|Fully Automated Install (FAI) Poster]] | ||
− | + | == Replicator == | |
− | |||
− | |||
− | |||
− | |||
− | ==Replicator== | ||
'''Replicator''' seems like it could use some volunteers to expand. http://replicator.sourceforge.net/ It tries to do some customization for differences in hard disk sizes, video cards, etc. You may want to check it out. | '''Replicator''' seems like it could use some volunteers to expand. http://replicator.sourceforge.net/ It tries to do some customization for differences in hard disk sizes, video cards, etc. You may want to check it out. | ||
− | ==Partition Image== | + | == Partition Image == |
− | '''[http://www.partimage.org/ Partition Image]''' is a semi-automated tool for replicating a Linux partition to multiple targets. It is particularly useful as a system cloning tool, and has many uses for data backup and archiving of whole disks or partitions. | + | '''[http://www.partimage.org/ Partition Image]''' is a semi-automated tool for replicating a Linux partition to multiple targets. It is particularly useful as a system cloning tool, and has many uses for data backup and archiving of whole disks or partitions. |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
[[Category:Howto]] | [[Category:Howto]] |
Revision as of 23:29, 17 November 2008
Once you have backups, you can and should test the ability to restore those backups to a new hardware environment. The restore procedure is going to depend on what you used to create your "image" in the first place. Independent of the notion of backups, a system administrator (or even an experienced user) will want to "clone" a computer system. That is make an identical copy or nearly identical copy of a computer on different hardware. The most widespread use-case for this is when a person gets a new computer and wants to migrate the old computer software and data to the new hardware. From the system administrator's perspective, the common use case is different: it's when you have to build out a cluster, provide redundancy, or otherwise scale a hardware/software platform.
Consider all the times that you could produce a system that you wish to replicate. For example, a standard "Developer's Workstation" or "Designer's Studio" or "Student Desktop" and many more technical varieties like "Web Front-end", "Mail Relay" etc.
Contents
Apt-get --set-selections[edit | edit source]
One way to do this on Debian-based systems (including Ubuntu) is to use dpkg
get/set-selections in combination with apt-get
using it's dselect-upgrade option:
To clone the package installation state of System A to System B do the following:
on System A[edit | edit source]
sudo dpkg --get-selections > package-list.txt
copy package-list.txt from System A to System B
on System B[edit | edit source]
sudo dpkg --set-selections < package-list.txt
sudo apt-get -u dselect-upgrade
There are other tools to do the job too, and the tools you want to use for this depend on how automated you aim for this task to be, and how much you need/want to be able to customize each machine as it's being installed.
KickStart[edit | edit source]
Kickstart is a Red Hat package that deploys Red Hat to multiple installation targets with minimal customisation. Aside from the wiki, it is also covered in the Installation Guide for RedHat Enterprise Linux
System Imager[edit | edit source]
SystemImager is a third-party tool that does a better job. http://systemimager.org/
Fully Automated Install[edit | edit source]
fai (fully automated install) is a Debian-based tool to do likewise. Like System Imager, it's suitable for building clusters. See the
Replicator[edit | edit source]
Replicator seems like it could use some volunteers to expand. http://replicator.sourceforge.net/ It tries to do some customization for differences in hard disk sizes, video cards, etc. You may want to check it out.
Partition Image[edit | edit source]
Partition Image is a semi-automated tool for replicating a Linux partition to multiple targets. It is particularly useful as a system cloning tool, and has many uses for data backup and archiving of whole disks or partitions.