Difference between revisions of "How to copy a Linux installation"

From ThinkWiki
Jump to: navigation, search
 
(added some structure and mentioned tar)
Line 1: Line 1:
The best way to make a 1:1 copy.
+
== Using dd to make a 1:1 copy ==
  
 +
=== Advantages ===
  
1. The Linux installation is on a seperate Harddisk
+
=== Disadvantages ===
 +
 
 +
=== Case 1: The Linux installation is on a seperate Harddisk ===
  
 
dd if=/dev/hd[a,b,c,..] of=/dev/hd[a,b,c,..] bs=2M
 
dd if=/dev/hd[a,b,c,..] of=/dev/hd[a,b,c,..] bs=2M
Line 11: Line 14:
  
  
2. The Linux installation is on a Partition
+
=== Case 2: The Linux installation is on a Partition ===
  
 
(e.g. hda1 is the Partition with the Linux installation and hdb1 is the Destinationdrive)
 
(e.g. hda1 is the Partition with the Linux installation and hdb1 is the Destinationdrive)
  
 
dd if=/dev/hda1 of=/dev/hdb1 bs=2M
 
dd if=/dev/hda1 of=/dev/hdb1 bs=2M
 +
 +
== Using tar to make a copy of the filesystem ==
 +
 +
=== Advantages ===
 +
 +
=== Disadvantages ===

Revision as of 07:05, 22 September 2005

Using dd to make a 1:1 copy

Advantages

Disadvantages

Case 1: The Linux installation is on a seperate Harddisk

dd if=/dev/hd[a,b,c,..] of=/dev/hd[a,b,c,..] bs=2M

Part of Sourcedrive  : if=/dev/hd[a,b,c,..] the Letter "a" for the first Harddrive, b for the second, ....

Part of Destinationdrive  : of=/dev/hd[a,b,c,..] the Letter "a" for the first Harddrive, b for the second, ....


Case 2: The Linux installation is on a Partition

(e.g. hda1 is the Partition with the Linux installation and hdb1 is the Destinationdrive)

dd if=/dev/hda1 of=/dev/hdb1 bs=2M

Using tar to make a copy of the filesystem

Advantages

Disadvantages