Cloning just the used part of disk

xerox

New Member
Joined
Jun 14, 2024
Messages
5
Reaction score
0
Credits
45
I have a 240GB SSD with just 10GB used, and I need to clone it (usually dd)
Is there a quick and easy way to clone just the used part instead of dd sdx>sdy that would take lot of time ?
I could shrink partition to 10 GB, clone and resize...
Sugggestions please ?
Thank you.
 


Welcome to the Forum.
1718358728586.gif


At this stage 10GB of used space isn't much to worry about...have you setup Timeshift ?

Setup Timeshift on an External HDD or SSD of at least 1TB in size...Timeshift takes a snapshot of the used space on the Drive and can easily be restored.

You should never rely on only one backup solution...thats where Foxclone and Redorescue come in...both create an image of used space on the Drive which both store on an External HDD or SSD but not the same Drive as Timeshift snapshots are stored because Timeshift requires an EXT4 partition...where as the others don't.

My 500GB SSD at the moment has 158GB of used space...which is backed with the above tools. Should anything happen...it's an easy matter to restore the image and that includes Drive failure...hope this helps.
1718360021649.gif
 
Hi,

If this is a linux drive you can create a new partition table with new partitions on your destination drive. Than you can mount thje new partitions, copy your files with rsync and install your bootloader to it if required but. This is no easy way.
 
Thank you for replies.
It's not a backup, I need to replicate a linux machine more than once from a stored image when needed.
A 10/20 GB SSD would be enough and could be quickly cloned with dd (it's a bootable machine).
Now you find minimum 120/240 GB space SSD that's a waste of space for this application but mostly a waste of time with dd in copying the empty space.
 
Thank you for replies.
It's not a backup, I need to replicate a linux machine more than once from a stored image when needed.

That's exactly what I'm saying in post 2. An Image is a backup and can be put back on the same Drive or another Drive in a different computer.
1718840446529.gif
 
Timeshift, again.

Timeshift snapshots just the space consumed by the installed distro. You can set it to include a Home folder or a Home partition.

It has zero compression, that is, 1:1 - but it reports size in GB, not GiB, so if your source install consumes 10 GiB, the snapshot may be, say, 11 GB.

On the target machine, reformat it to EXT, and if all computers are UEFI, create an ESP (EFI System Partition) of, say 500MiB as FAT32, and an EXT4 partition that is whatever size you like,but bigger than the snapshot.

Using an SSD as storage for the snapshots, the restore process will work very quickly with a USB 3 cable to a USB 3 port.

After you press Restore within Timeshift, you simply give it the new details of the devices for the ESP partition and the EXT4 partition, and tell it to proceed.

Timeshift will make the necessary adjustments to /etc/fstab at the receiving end.

This will work faster than Clonezilla, dd, RedoRescue and Foxclone, as I believe Bob has found recently.

In mid-June 2022, after my wife passed away, I used this method using my WD My Book 4 TB SATA drive (which had all my snapshots stored), and moved maybe 80 distros from my computer in te garage to the computer in the study.

Cheers

Chris Turner
wizardfromoz
 

Members online


Top