1

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:

  1. Shrink the 986GB partition of Ubuntu which has 22GB utilization to ~30 GB and then clone the partition to flash drive
  2. 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:

enter image description here

Disk Usage Analyzer Root:

enter image description here

Disk Usage Analyzer Home:

enter image description here

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.

1

Cloning to a Smaller Disk using GParted

Here is a method that I tested booted in legacy mode.

  1. Boot Ubuntu Live USB.

  2. Insert Source and Target disks if not already there.

  3. Confirm Source and Target have same partition table, GPT or MSDOS.

  4. Open GParted and shrink Source partition to less than 32GB.

  5. Select Source disk and right click source / partition and select Copy.

  6. Select Target disk and right click empty space and select Paste.

  7. Stretch pasted partition to fill drive.

  8. Click Apply All Operations, (The check mark at the top).

  9. 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.

2
1

EDIT:

Clonezilla is (almost) always a good option, e.g. this.


It depends on many factors. You didn't mention:

  1. 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).

  2. 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

  1. https://bln364.com/clone-hdd-to-smaller-sdd-on-linux/
  2. How to clone to a smaller harddisk?
1
  • Thank you! I have added information based on your suggestions. Now I will read/skim through the links you have shared. May 20 at 7:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.