Skip to main content
2 of 3
added 111 characters in body
grawity_u1686
  • 463.9k
  • 66
  • 974
  • 1.1k

So my question is how to do this? Must I boot into a different system?

Log out from your regular account, then log in as root. Root's home directory is traditionally /root, which is outside of /home.

Then make sure all your user processes have stopped – e.g. there might be a 'systemd --user' process lingering around; stop it using systemctl stop user@YourUID. (Kill any other leftovers using systemctl stop user-YourUID.slice or just pkill -u YourName.)

Maybe there is an easier way to restore a snapshot of home?

You don't necessarily have to restore the whole snapshot in the first place if you can just cp -a the specific files or directories that you need out of the snapshot.

$ sudo cp -av /snapshots/home_snap_1234/Projects ~/Projects.restored

With modern GNU coreutils 'cp', this will make reflinks instead of full copies and will occupy no extra space (although if your coreutils is older than 9.1 then you'll need to add --reflink to ensure that).

grawity_u1686
  • 463.9k
  • 66
  • 974
  • 1.1k