Skip to main content
added 84 characters in body
Source Link
grawity_u1686
  • 463.4k
  • 66
  • 972
  • 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

(Depending on how /snapshots has been set up, you might not even need 'sudo'.)

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

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

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

(Depending on how /snapshots has been set up, you might not even need 'sudo'.)

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

added 111 characters in body
Source Link
grawity_u1686
  • 463.4k
  • 66
  • 972
  • 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

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

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.

This will make reflinks instead of full copies and will occupy no extra space (although if you have coreutils older than 9.1? then you'll need to pass --reflink to ensure that).

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

Source Link
grawity_u1686
  • 463.4k
  • 66
  • 972
  • 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.

This will make reflinks instead of full copies and will occupy no extra space (although if you have coreutils older than 9.1? then you'll need to pass --reflink to ensure that).