Score:0

Restoring from old hard drive

va flag

Background: I have a Dell Laptop with Ubuntu (VERSION="20.04.3 LTS (Focal Fossa)"). This laptop has a 1TB hard drive. Now I am looking to upgrade the laptop to a 2TB hard drive (SSD).

Problem: Once I install the new drive and install Ubuntu, I would lose the environment, such as browswer cookies etc..

Question: How can I restore the entire contents of the current hard drive to the new drive?. End state: Once I finish the upgrade, I want the new drive to be complete replica of the old drive.

sudodus avatar
jp flag
Then you can clone it with [Clonezilla](https://askubuntu.com/questions/958242/fastest-way-to-copy-hdd/958248?r=SearchResults&s=4|12.7968#958248), and after that remove the original drive before rebooting. When you know that it works, you can switch it off again, and from another drive (for example the Ubuntu install drive) run gparted and expand the partition(s) of Ubuntu (or optionally create a new 'data' partition and add a line for it in /etc/fstab to mount it).
Someone avatar
my flag
https://askubuntu.com/a/1367529/1460940 Does this solve your problem? **Look at answer instead of question**.
Score:4
cn flag

IF possible add the 2nd one to the 2nd connector of the notebook if you have. That would make it a lot quicker to do.

IF that is not possible you could add both to a desktop and do it from there.

Otherwise get an external casing (usb 3 connector at least because it will take some time), add the 2Tb to the casing. Then Attach the 2 Tb to the laptop

With those 2 disks available ...

diskdump the 1 Tb onto the 2Tb from a LIVE session to avoid changes to the active disk. After that switch the disks and use gparted to format and merge the 2nd Tb onto the 1st one.

Problem: Once I install the new drive and install Ubuntu, I would lose the environment, such as browswer cookies etc..

I would approach this in another way though that is more in line with a new install. You do THAT more often than replace a hard drive. And that method is repeatable with the use of a couple of scripts. Far quicker and more robust.

Install the new disk, install from fresh Ubuntu 20.04 or 21.04 (next lts) and then copy personal data over from the 1Tb (put that one in a case) to the 2Tb. Those browser cookies are not that interesting but you could copy them over from the 1Tb if needed. It is such a small file you could store it on google drive. That method is also possible with a lot of other settings.

aq flag
diskdump is my goto for this task, however I have had issues doing this while the disk is mounted. I always do it from another OS or a Live disk. You can also put both disks in a desktop to do the job if an external drive is not available for the laptop.
cn flag
ah very good one :)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.