Snapper cant restore home folder

Hello !

I have started the assistant and entered my password.
I have made made snapper snapshots of my home folder.
then when i click on restore mode and select the snapshot image i get the message:
"failed to restore snapshot.

so then i did go to the terminal and did:
sudo garuda-assistant and entered the password
then try the same thing again and got this message :

"Can't restore snapshot while the target subvolume is mounted"

I can see that snapper auto create a .snapshot folder in the home folder.
(obs, not my home/username/.snapshots)
but directly home/.snapshots

so it means it will take snapshots of all the user in the home folder, currently guest and me
i was wondering how can i do to make snapshots and then restore them.

I have formatted my system like 5 times when i make some mistakes and cant revert back. please help.
Or maybe an step by step tutorial on how to backup your entire root, and also only the home/user folder.

I forgot to mention i have only one partition with root and the also home of course.
I cant put screenshots as new user or embed link to my google drive.
I hope some kind enough to help me this would be a live saver.

Below are my screenshots :
https://drive.google.com/file/d/1E-U01FAlD8LbMeZ5SX392faBVkE1pBMi/view?usp=sharing, https://drive.google.com/file/d/1c1H0VCWcobu14PTo9Jt57gSYcFySg1NR/view?usp=sharing, https://drive.google.com/file/d/1pWpZzr8QnRxmqgyC-ZGFPvTIYIOOBCKo/view?usp=sharing

You can't restore home in a running system. It is in use.

You need to boot off the ISO and run garuda-assistant from there. Then you should be able to restore your home snapshot. Once it is restored, then you can boot back into your normal system.

6 Likes

Thank you for your answer.
It sound pretty straight forward then.
Now I can be calm if I make any changes in my root system and my home folder.

Because I read somewhere that the root config does not include the home folder, I don't know if its actually the case. so better have a separate home config.

That is correct. You need separate configs for each subvolume you want snapshots of.

1 Like

how could i find what is included and what not in ex root? in my partition home is not like a drive, just a folder. so how can i know it is not included, or better what is included. I can understand that for example /boot/efi is a subvolume because it is actually another partition in the hdd.

but the home folder is not mounted as it is not in another partatition in my hdd is in the same as root.

sudo btrfs subvolume list / | grep -v snapshot

That isn’t a subvolume, it should be a partition that is mounted there.

btrfs subvolumes are logically separate volumes that exist in a single partition. They more or less act similarly to partitions except that they share space with each other.

2 Likes

If you are finding it too cumbersome to configure snapshots of your home directory, perhaps you would find BackInTime easier to use. The other reason BackInTime may be preferable is that you can store your backups on another drive that does not have to be formatted as btrfs. If you use ext4 formatted storage drives this would give you far more flexibility on the storage location.

One reason I prefer ext4 for data storage is that the bulk of my files are already compressed, so btrfs is not a huge advantage. Also, if you need to use data recovery software in an emergency, most recovery utilities have better support for ext4.

Just another option, (do whatever you please), and welcome to the forum.

1 Like

Thank you for your explanation it clarifies a lot

1 Like

Thank you, I will try both snapper as it is integrated in Garuda, and also test BackInTime, I like the idea that I can save my backups on different partitions or even different harddrives.
By the way why they change from timeshift to snapper?

snapper is a lot more flexible with more options. It also creates read-only snapshots which can easily be sent to an external or remote device, and are safer when snapshot booting.

That being said, if you want to use timeshift instead, you can easily switch back with the timeshift-support package.

KDE also has Kbackup, which I am about to use/test for my local sync folder. Users seem to like it. :man_shrugging:

Hi dalto thank you for the info.
You wrote that snapper is more flexible and it can also create read only snapshot that can be easily sent to external devices.

So i was wondering this.
How can i take a snapshop of my user folder. If i take snappshot of home folder. it will backup all users in this home folder ex:
home
-user1
-user2
-user3

so lets say i want only to backup my user "user2" in this case, and i want the snapshots to be stored in an external usb hdd /etc/dev/sdb2

and then i do something in my user2 folder, change some config or remove the panels and it brakes my desktop
then i want to restore the /home/user2 folder as it was before, like restore the whole user2 folder.

how would i do this?
I have been reading in the internet and i understand that it can be done but not sure how. i have a fairly grasp of the basic commands, just need that little extra

There are a couple of different things that need to be unpacked here in order to understand how to do this with btrfs.

btrfs snapshots always contain an entire btrfs subvolume. You can’t include or exclude certain parts of it. That isn’t how a snapshot works.

However, there is an easy solution to this problem. You can create an additional subvolume, copy your data to it and then mount it at /home/user2. Then take a snapshot of that subvolume instead of /home

To achieve this you can use snapshot replication. The way this works is that /dev/sdb2 must be formatted as btrfs and then you can use btrfs send and btrfs receive to ship the snapshots to the other drive.

There are also 3rd party tools for snapper which automate this process for you.

In this case, you would have no need to go to your external drive. You could just restore the local copy of the snapshot manually or using garuda assistant.

The primary reason to replicate the snapshots to another device is to protect your self against disk failure or filesystem corruption.

1 Like

hi!

If a make a subvolume of home/user2 then i have to remove the /home subvolume folder right? or can i just do :

btrfs subvolume create /home/user2

snapper -c user2 create-config /home/user2

and to allow the user2 to be able to manage the snapshots:
sudo snapper -c user2 set-config “ALLOW_USERS= user2r” SYNC_ACL=“yes”

And that should be it?

Oh by the way should i remove the original /home/user2 folder after have made the subvolume /home/user2 and copy all the data to it? and how would this subvolume be mounted automatic every time i start my system?

and also you wrote :

but how can i restore the local copy of my snapshop to earlier snapshots manually or using garuda assistant, if user im currently using is the one i want to restore, i mean if i am user2 and i want to restore a snapshot that was actually working.
And sorry for asking many question. im noob to snapshots ans restores.

No, that would delete all the data in /home

You can do it that way but you would need to temporarily move /home/user2 out of the way if it already exists. Then create the subvolume and move the data into the new subvolume.

Yes

Add an entry in /etc/fstab just like all the other entries. The subvol= part would be subvol=@home/user2

You can’t. However, putting the snapshot on a different drive doesn’t actually solve this problem.

There are two options here that I can think of off the top of my head:

  • You could login as a different user or boot off the ISO and restore the snapshot
  • You could use rsync to copy the data out of the snapshot into the original subvolume

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.