Restoring /home to a new disk, then delete + mount?

Intro
While the backup with restic now works flawlessly (and fast), I have acquired a few new hard drives that I want to use for /home (and other stuff). I have a small logistic problem with how to do that. I know, this is not a restic problem strictly, but I suspect you guys have the knowledge how to do this. So I describe my own plan and hopefully someone can point me in the right direction.

Plan

  1. Restore the backed up /home directory to the new drive
  2. copy over files from /home to the new drive, that I did not backup.
  3. I remove the real /home directory [this is the main problem]
  4. Mount the new drive on /home

Result
So the result should be a newly mounted /home and the space for the original /home free-ed.

Queries

  1. How do I remove /home, as I need it to do anything? As soon as I install the new drive as /home, I can no longer reach the “/home” on my original drive. So it will contain these files eternally, until I finally remove the mounted drive.

  2. Any way to discriminate between files that were backed up and files that were not backed up, so I can copy only non-backed up files?

Terve! Johannes.

Just two short comments:

  • Copying over data to a new disc could be done by just using cp -a /home /home-new followed by changing the mount point(s).
  • It might be a good idea to additionally test your backup restore during this process, right. In this case, doing a restore should suffice. If not, you are not backing up all important data…

I don’t backup caches and game executables (both are really big and I can re-download games in case of restore). In this case, I can copy them over to save download time. Hence question 2.

About the first query. If I just mount the new /home over the old one, then the old data is still on my OS drive, taking up space (a few hundred GB), so I would prefer to remove them, but I cannot just umount
/home as that would be problematic on a live system. Hence my first query.

On the other hand, the OS drive is 2TB which should be enough, even with old home data.

Your solution does have advantages (simply copying over). I can still test the restore on my laptop on which I cannot play the games anyway. I will give it a thought.

Thanks for the response.

You probably just want to run rsync -PHAXphax old-home new-home once while the system runs. Then boot into a live linux system run another rsync (with an additional --delete option), update etc/fstab in your root partition and rebuild the ramdisk. Your home won’t be in a consistent state if you move it while the system still runs.