Gentoo Archives: gentoo-user

From: Michael <confabulate@××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] duplicate gentoo system
Date: Tue, 17 Nov 2020 18:26:36
Message-Id: 3018124.5fSG56mABF@lenovo.localdomain
In Reply to: [gentoo-user] duplicate gentoo system by thelma@sys-concept.com
1 On Tuesday, 17 November 2020 17:47:09 GMT thelma@×××××××××××.com wrote:
2 > I'm looking for an idea to duplicate my old gentoo system.
3 > I'm using old programs that require older version php, ( PHP Version
4 > 5.6) the program is not compatible with newer php. 7.4 and apache 2.2
5 >
6 > Gentoo is install on 1TB SSD (/dev/sda)
7 > The new 2TB SSD is M.2 (so it has a strange name)
8 >
9 > 1.) Is my option only:
10 > dd if=/dev/sdX of=/dev/sdY bs=64K conv=noerror,sync
11 >
12 > If I duplicate the drive this way I'll end-up with two partitions, as
13 > I'll have 1TB free on a new drive. Or is there a way to resize
14 > partition on M.2 SSD
15 >
16 > 2.) Another options, I could dig-out the old programs from "attic", but
17 > that will not be an easy job.
18
19 You could go about this in a number of different ways.
20
21 dd command will take forever, as it is copying every bit and byte from one
22 disk to the next, whether it contains data or not.
23
24 I prefer to use a clonezilla liveUSB to copy a disk or selected partitions
25 between disks, which will take significantly less time as only blocks with
26 data get copied over.
27
28 You can increase the partition size after you finish copying it onto the new
29 disk and then the filesystem size within it. Gparted can run both steps in a
30 single stroke.
31
32 If you prefer a more manual and tedious way, you can create a partition as
33 large as you need it to be on the new disk, format it with a filesystem of
34 choice, then use rsync or tar to copy over the files you want and --exclude
35 anything you don't want copied over.

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] duplicate gentoo system thelma@×××××××××××.com
Re: [gentoo-user] duplicate gentoo system thelma@×××××××××××.com