First you'll think of the DD command.
But
1, if the small hard drive is OK, the big hard drive on t is not high efficiency;
2, moreover, DD is a hardware-level copy, the front of the MBR will also be restored to another disk, if the source hard disk is 100G, the target disk is 200G, and will have problems, 200G hard disk due to be overwritten by the write 100G hard disk MBR caused only available 100G, not to mention rewrite MBR quite trouble;
So it's best not to back up to another drive in a way similar to DD IF=/DEV/SDA of=/dev/sdb.
It is recommended to copy it in tar.
First, refer to the fdisk-l display of the target hard disk with Fdisk as the source hard disk partition, each partition of the starting bar can be seen at the end of the bar, of course, you can also define the partition size as needed;
Where the swap partition in Fdisk after the new partition (that is, the partition is allocated well) with the T option to specify the ID of 82, if FAT32 is B;
After the area is divided, it is formatted with MKFS. (The partition format of the source hard disk can be #df-t view)
#mkfs-T EXT3/DEV/SDB1
The source hard disk partition can then be backed up to the target hard disk partition by partition:
mkdir /mnt/sda1/mnt/Mount /dev/sda1/mnt/Mount /dev/sdb1/mnt/ /mnt/tar -CPV. | Tar -xpc/mnt/sdb1
Of course someone will say such trouble, direct DD if=/dev/sda1 OF=/DEV/SDB1, this is not to say no, but,,,
1, if a larger partition meaningless copy empty data is not a smart approach;
The 2,tar solves the fragmentation problem when the copy is restored, so it is highly recommended for a copy of the system. (although there is no need to worry too much about disk fragmentation for the Linux partition format)
Linux backup system to another drive