Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Science may someday discover what faith has always known.


devel / comp.unix.shell / Re: Clone the disk partition data into an IMG file with dd in the way similar to partclone.

SubjectAuthor
* Clone the disk partition data into an IMG file with dd in the wayhongy...@gmail.com
`* Re: Clone the disk partition data into an IMG file with dd in the wayDavid W. Hodgins
 `- Re: Clone the disk partition data into an IMG file with dd in the wayhongy...@gmail.com

1
Clone the disk partition data into an IMG file with dd in the way similar to partclone.

<ca0108a4-4de9-4f10-8858-b947f7bce478n@googlegroups.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=4245&group=comp.unix.shell#4245

 copy link   Newsgroups: comp.unix.shell
X-Received: by 2002:ac8:5845:: with SMTP id h5mr17648645qth.91.1629462131290;
Fri, 20 Aug 2021 05:22:11 -0700 (PDT)
X-Received: by 2002:a05:6214:a6c:: with SMTP id ef12mr19932266qvb.13.1629462131164;
Fri, 20 Aug 2021 05:22:11 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.unix.shell
Date: Fri, 20 Aug 2021 05:22:11 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=103.138.53.88; posting-account=kF0ZaAoAAACPbiK5gldhAyX5qTd3krV2
NNTP-Posting-Host: 103.138.53.88
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ca0108a4-4de9-4f10-8858-b947f7bce478n@googlegroups.com>
Subject: Clone the disk partition data into an IMG file with dd in the way
similar to partclone.
From: hongyi.z...@gmail.com (hongy...@gmail.com)
Injection-Date: Fri, 20 Aug 2021 12:22:11 +0000
Content-Type: text/plain; charset="UTF-8"
 by: hongy...@gmail.com - Fri, 20 Aug 2021 12:22 UTC

See the following testing:

$ sudo partclone.ext4 -c -s /dev/nvme0n1p2 -o aaa.img
Partclone v0.3.13 http://partclone.org
Starting to clone device (/dev/nvme0n1p2) to image (aaa.img)
Reading Super Block
Calculating bitmap... Please wait...
Elapsed: 00:00:01, Remaining: 00:00:00, Completed: 100.00%
Total Time: 00:00:01, 100.00% completed!
done!
File system: EXTFS
Device size: 26.2 GB = 6400000 Blocks
Space in use: 9.4 GB = 2299940 Blocks
Free Space: 16.8 GB = 4100060 Blocks
Block size: 4096 Byte
Elapsed: 00:00:34, Remaining: 00:00:00, Completed: 100.00%, Rate: 16.62GB/min,
current block: 6400000, total block: 6400000, Complete: 100.00%
Total Time: 00:00:34, Ave. Rate: 16.6GB/min, 100.00% completed!
Syncing... OK!
Partclone successfully cloned the device (/dev/nvme0n1p2) to the image (aaa.img)
Cloned successfully.

$ du -h aaa.img
8.8G aaa.img

As you can see, the partclone tool let me clone the real blocks used on the disk part into an IMG file which can be used to restore to another disk partition later.

I want to know if I can use dd to achieve the same purpose.

Regards,
HY

Re: Clone the disk partition data into an IMG file with dd in the way similar to partclone.

<op.08fro0tva3w0dxdave@hodgins.homeip.net>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=4246&group=comp.unix.shell#4246

 copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: dwhodg...@nomail.afraid.org (David W. Hodgins)
Newsgroups: comp.unix.shell
Subject: Re: Clone the disk partition data into an IMG file with dd in the way
similar to partclone.
Date: Fri, 20 Aug 2021 14:16:02 -0400
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <op.08fro0tva3w0dxdave@hodgins.homeip.net>
References: <ca0108a4-4de9-4f10-8858-b947f7bce478n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes
Content-Transfer-Encoding: 8bit
Injection-Info: reader02.eternal-september.org; posting-host="cf4335330d0ee1a7da47072260ab3803";
logging-data="16139"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18p2RObekNLge2ept8jxhZElqQRkQlBJs8="
User-Agent: Opera Mail/12.16 (Linux)
Cancel-Lock: sha1:Bx/un58YvUQQisOepjC48h47tCU=
 by: David W. Hodgins - Fri, 20 Aug 2021 18:16 UTC

On Fri, 20 Aug 2021 08:22:11 -0400, hongy...@gmail.com <hongyi.zhao@gmail.com> wrote:
> As you can see, the partclone tool let me clone the real blocks used on the disk
> part into an IMG file which can be used to restore to another disk partition later.
> I want to know if I can use dd to achieve the same purpose.

The dd program does a device to device exact copy. It works with other files too,
making a byte for byte copy.

Adding the sparse option will reduce the output file space used, if the input file
has blocks that are entirely binary zero.

It will not copy just the blocks used by currently allocated files. Deleted files
that have not been overwritten will be copied too.

So it isn't the same as a partclone image, but can lead to similar results.

Regards, Dave Hodgins

--
Change dwhodgins@nomail.afraid.org to davidwhodgins@teksavvy.com for
email replies.

Re: Clone the disk partition data into an IMG file with dd in the way similar to partclone.

<0c6d23b1-0f3f-4c3c-8ca1-74fc2d9f61c4n@googlegroups.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=4247&group=comp.unix.shell#4247

 copy link   Newsgroups: comp.unix.shell
X-Received: by 2002:a05:622a:120d:: with SMTP id y13mr22333577qtx.10.1629546220043;
Sat, 21 Aug 2021 04:43:40 -0700 (PDT)
X-Received: by 2002:a05:622a:1206:: with SMTP id y6mr21487413qtx.243.1629546219844;
Sat, 21 Aug 2021 04:43:39 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.unix.shell
Date: Sat, 21 Aug 2021 04:43:39 -0700 (PDT)
In-Reply-To: <op.08fro0tva3w0dxdave@hodgins.homeip.net>
Injection-Info: google-groups.googlegroups.com; posting-host=103.138.53.176; posting-account=kF0ZaAoAAACPbiK5gldhAyX5qTd3krV2
NNTP-Posting-Host: 103.138.53.176
References: <ca0108a4-4de9-4f10-8858-b947f7bce478n@googlegroups.com> <op.08fro0tva3w0dxdave@hodgins.homeip.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0c6d23b1-0f3f-4c3c-8ca1-74fc2d9f61c4n@googlegroups.com>
Subject: Re: Clone the disk partition data into an IMG file with dd in the way
similar to partclone.
From: hongyi.z...@gmail.com (hongy...@gmail.com)
Injection-Date: Sat, 21 Aug 2021 11:43:40 +0000
Content-Type: text/plain; charset="UTF-8"
 by: hongy...@gmail.com - Sat, 21 Aug 2021 11:43 UTC

On Saturday, August 21, 2021 at 2:16:14 AM UTC+8, David W. Hodgins wrote:
> On Fri, 20 Aug 2021 08:22:11 -0400, hongy...@gmail.com <hongy...@gmail.com> wrote:
> > As you can see, the partclone tool let me clone the real blocks used on the disk
> > part into an IMG file which can be used to restore to another disk partition later.
> > I want to know if I can use dd to achieve the same purpose.
> The dd program does a device to device exact copy. It works with other files too,
> making a byte for byte copy.
>
> Adding the sparse option will reduce the output file space used, if the input file
> has blocks that are entirely binary zero.
>
> It will not copy just the blocks used by currently allocated files. Deleted files
> that have not been overwritten will be copied too.
>
> So it isn't the same as a partclone image, but can lead to similar results.

Thank you for your comments. So, the image file generated by partclone will have smaller size in any case.
HY

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor