Installed new Hard drive with Fedora35, my old home is in second drive (fedora 34). Can I recover home?

I had my fedora 34 in an SSD drive and decided to upgrade to 35 last days of December/2021. I didn’t get any errors, but I had some issues.
No sound was one of them, and many software stopped working. But, of course, that was normal when I upgraded before, so I didn’t pay attention.

Well, I got help from this forum trying to fix the “No sound” issue, and I realized that my upgrade had failed. I could not recover, and I was stuck on fedora 34 1/2 (yes, half :wink: ) with no sound. So I had a new NVMe hard drive, and I installed it.
I got Fedora35 in my new M.2, Fedora 34 1/2 in my SSD, and my home backup on a USB drive.

How can I recover my home directory, if it is possible, from fedora 34 1/2?
If that is not possible, can I recover from the USB drive?

If the old drive is still in the machine you can make a mount point (sudo mkdir /mnt/olddrive, or whatever you want to call the directory is fine), mount the drive (sudo mount /dev/sdX /mnt/olddrive–replace X with whatever letter the old drive has, you can check with lsblk–then copy over your files.

You can use something like rsync, or through the GUI is fine too (whatever file manager you use).

Just be aware that mostly hidden files are not visible, just check before copying with a file-manager.
If you keep the SSD in the computer, you can also just mount the home from the SSD and add it to the /etc/fstab file.

cp will not see or copy the hidden files without some manipulation, nor will the gui file manager.
rsync will and easily retains all the permissions.

Using the example given above for the mount point, you can use the following to get everything from the old /home, including the hidden files once the old directory has been mounted.
This is assuming that you had the old /home on a separate partition and that you mounted that at /mnt/olddrive
sudo rsync -av /mnt/olddrive/username/ /home/username/
The trailing / is important and necessary on both parts of the paths in that command. It tells rsync to copy everything in the directory /mnt/olddrive/username/ to the new location.
You may need to modify the /mnt/olddrive/ portion depending on how it appears once the old partition containing /home has been mounted.

2 Likes