Gentoo Archives: gentoo-user

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