Clone drive target hardware decision
I am planning to clone the 1TB drive of a PC which has operational importance for a project. Right now, only 22GB of the drive is utilized and I have a 32GB flash drive that I may use for cloning purposes. Since cloning an entire terabyte of data to a 32GB flash drive is not possible, it seems that I have only two options at hand:
- Shrink the 986GB partition of Ubuntu which has 22GB utilization to ~30 GB and then clone the partition to flash drive
- Buy a 1TB USB drive to perform the cloning operation.
Which option makes more sense? Do I have any other options?
I would appreciate any ideas/suggestions and can make clarifications if needed.
3 EDITS:
1- What is the final destination of the cloned data? : The reason why I would like to clone this drive is to have the ability to recover from the clone if the original system destabilizes for some reason. So the final destination is the drive itself.
2- What is the partition structure of the source drive?: I have downloaded GParted and I shared the structure below. But found out that there are different numbers compared to Disk Usage Analyzer. Here are both reports:
Gparted:
Disk Usage Analyzer Root:
Disk Usage Analyzer Home:
3- Do you want to clone only one partition?:
I all want is to have my linux kernel, drivers and libraries to be preserved and made ready to be reanimated anytime. My plan is to not to touch anything else but recover that partition to its original state only, if possible.
Solution 1:
Cloning to a Smaller Disk using GParted
Here is a method that I tested booted in legacy mode.
-
Boot Ubuntu Live USB.
-
Insert Source and Target disks if not already there.
-
Confirm Source and Target have same partition table, GPT or MSDOS.
-
Open GParted and shrink Source partition to less than 32GB.
-
Select Source disk and right click source / partition and select
Copy
. -
Select Target disk and right click empty space and select
Paste
. -
Stretch pasted partition to fill drive.
-
Click
Apply All Operations
, (The check mark at the top). -
Close GParted and install Grub using Terminal
sudo mount /dev/sdxy /mnt sudo grub-install --boot-directory=/mnt/boot /dev/sdx
Where sdx is the Target drive and y is the partition number.
Solution 2:
EDIT:
Clonezilla is (almost) always a good option, e.g. this.
It depends on many factors. You didn't mention:
-
What is the final destination of the cloned data. I assume it is not the flash drive, and I do not know if you are considering "cloning" into the same origin hard drive (I wouldn't call that cloning).
-
What is the partition structure of the source drive, or if you want to clone only one partition. From the way you wrote the OP, I guess you want to clone only one partition of 1Tb, and that your partition has the OS, otherwise you could simply
rsync
the contents. Then you have to check if you have root and home in separate partitions.
Lacking this information, I would say that if option 1 satisfies your technical requirements, it should work pretty straightforwardly, and I would stick to it. Alternatively, you could clone directly into your target destination if not the pendrive.
It would help reading Cloning hard disk partition to smaller SSD on laptop
Additionally
- https://bln364.com/clone-hdd-to-smaller-sdd-on-linux/
- How to clone to a smaller harddisk?