Snapshot home in different device than root

Hi, I'm a newcomer to garuda and after a bunch of tinkering and reformatting I finally achieved a great and stable system. It lasted for a few hours and I decided to try new KDE themes, but as it is my first time using KDE, I screwed up bad and couldn't get back to garuda theme. Then I thought that if I could snapshot my home directory, it would get a lot easier for tinkering and going back to a good point. Is there a way to snapshot home directory when it is located at a different device than my root? I'm coming from fedora and I am loving garuda so far.

Thanks!

Is you home filesystem btrfs? If so, than yes, you can snapshot it.

If not, what filesystem is it?

Oops, forgot to say that detail, but it is. How can I configure it? I tried it in btrfs assistant by putting /home as my backup path, but when I try to restore, it returns the error ‘Target not found’

Just like the output of ‘garuda-inxi’ as requested in the template. :slight_smile:

https://wiki.archlinux.org/title/snapper

Here goes my inxi:

System:
Kernel: 6.1.1-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
Desktop: KDE Plasma v: 5.26.4 Distro: Garuda Linux base: Arch Linux
Machine:
Type: Desktop Mobo: ASUSTeK model: ROG STRIX B450-E GAMING v: Rev 1.xx
serial: <superuser required> UEFI: American Megatrends v: 4901
date: 07/25/2022
CPU:
Info: 6-core model: AMD Ryzen 5 5600X bits: 64 type: MT MCP arch: Zen 3
rev: 0 cache: L1: 384 KiB L2: 3 MiB L3: 32 MiB
Speed (MHz): avg: 2385 high: 3439 min/max: 2200/4650 boost: enabled cores:
1: 2236 2: 2200 3: 2238 4: 2395 5: 2200 6: 3439 7: 2632 8: 2200 9: 2200
10: 2200 11: 2384 12: 2304 bogomips: 88805
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
Device-1: AMD Ellesmere [Radeon RX 470/480/570/570X/580/580X/590]
vendor: Tul / PowerColor driver: amdgpu v: kernel arch: GCN-4
bus-ID: 0a:00.0 temp: 52.0 C
Device-2: Logitech C920 HD Pro Webcam type: USB
driver: snd-usb-audio,uvcvideo bus-ID: 1-2:3
Display: x11 server: X.Org v: 21.1.6 with: Xwayland v: 22.1.7 driver: X:
loaded: amdgpu dri: radeonsi gpu: amdgpu resolution: 1920x1080
API: OpenGL v: 4.6 Mesa 22.3.1 renderer: AMD Radeon RX 590 Series
(polaris10 LLVM 14.0.6 DRM 3.49 6.1.1-zen1-1-zen) direct render: Yes
Audio:
Device-1: AMD Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590]
vendor: Tul / PowerColor driver: snd_hda_intel bus-ID: 1-1:2 v: kernel
bus-ID: 0a:00.1
Device-2: AMD Starship/Matisse HD Audio vendor: ASUSTeK
driver: snd_hda_intel v: kernel bus-ID: 0d:00.4
Device-3: Logitech G933 Wireless Headset Dongle type: USB
driver: hid-generic,snd-usb-audio,usbhid
Device-4: Logitech C920 HD Pro Webcam type: USB
driver: snd-usb-audio,uvcvideo bus-ID: 1-2:3
Sound API: ALSA v: k6.1.1-zen1-1-zen running: yes
Sound Server-1: PulseAudio v: 16.1 running: no
Sound Server-2: PipeWire v: 0.3.63 running: yes
Network:
Device-1: Intel I211 Gigabit Network vendor: ASUSTeK driver: igb v: kernel
port: e000 bus-ID: 04:00.0
IF: enp4s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Device-2: Intel Wireless-AC 9260 driver: iwlwifi v: kernel bus-ID: 05:00.0
IF: wlp5s0 state: down mac: <filter>
Bluetooth:
Device-1: Cambridge Silicon Radio Bluetooth Dongle (HCI mode) type: USB
driver: btusb v: 0.8 bus-ID: 1-6:5
Report: bt-adapter ID: hci0 rfk-id: 1 state: up address: <filter>
Drives:
Local Storage: total: 2.76 TiB used: 331.27 GiB (11.7%)
ID-1: /dev/nvme0n1 vendor: Seagate model: XPG GAMMIX S70 BLADE
size: 476.94 GiB temp: 45.9 C
ID-2: /dev/nvme1n1 vendor: Western Digital model: WDS250G1B0C-00S6U0
size: 232.89 GiB temp: 33.9 C
ID-3: /dev/sda vendor: Kingston model: SA400S37240G size: 223.57 GiB
ID-4: /dev/sdb vendor: Toshiba model: HDWD120 size: 1.82 TiB
ID-5: /dev/sdc type: USB vendor: A-Data model: USB Flash Drive
size: 28.91 GiB
Partition:
ID-1: / size: 48.83 GiB used: 11.51 GiB (23.6%) fs: btrfs
dev: /dev/nvme0n1p6
ID-2: /boot/efi size: 533 MiB used: 608 KiB (0.1%) fs: vfat
dev: /dev/nvme0n1p5
ID-3: /home size: 488.28 GiB used: 2.58 GiB (0.5%) fs: btrfs
dev: /dev/sdb3
ID-4: /var/log size: 48.83 GiB used: 11.51 GiB (23.6%) fs: btrfs
dev: /dev/nvme0n1p6
ID-5: /var/tmp size: 48.83 GiB used: 11.51 GiB (23.6%) fs: btrfs
dev: /dev/nvme0n1p6
Swap:
ID-1: swap-1 type: zram size: 15.54 GiB used: 0 KiB (0.0%) dev: /dev/zram0
Sensors:
System Temperatures: cpu: 44.0 C mobo: 35.0 C gpu: amdgpu temp: 53.0 C
Fan Speeds (RPM): cpu: 976 case-1: 1394 case-2: 1839 case-3: 1800
gpu: amdgpu fan: 466
Power: 12v: 10.14 5v: N/A 3.3v: N/A vbat: 3.25
Info:
Processes: 367 Uptime: 28m Memory: 15.54 GiB used: 3.47 GiB (22.3%)
Init: systemd Compilers: gcc: 12.2.0 Packages: 1447 Shell: fish v: 3.5.1
inxi: 3.3.24

I'm still getting the target not found thing. I tried creating a new subvolume for home and copying my old home to new home, but when I edit the fstab for reading from new home I get a black screen on reboot, thinking the cause is the system doesn't recognize my new home.

Sorry, inxi (-Faz) is not garuda-inxi
Missing

Garuda (2.6.12-1):
  System install date:     2021-11-30
  Last full system update: 2023-01-01 ↻
  Is partially upgraded:   No
  Relevant software:       NetworkManager
  Windows dual boot:       Yes
  Snapshots:               Snapper
  Failed units:            

as sample.

Check and post your

lsblk -f
NAME        FSTYPE FSVER LABEL       UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
zram0                                                                                    [SWAP]
nvme0n1                                                                                  
├─nvme0n1p1 vfat   FAT32 SYSTEM_DRV  6469-0837                             222,8M    13% /boot/efi
├─nvme0n1p2                                                                              
├─nvme0n1p3 ntfs         Windows-SSD 3AE6699EE6695B61                                    
├─nvme0n1p4 ntfs         WINRE_DRV   527469EC7469D2F1                                    
└─nvme0n1p5 btrfs                    ed159bee-f3f4-4cb1-aeff-997938929ff7     50G    79% /var/tmp
                                                                                         /var/log
                                                                                         /var/cache
                                                                                         /srv
                                                                                         /root
                                                                                         /home
                                                                                         /

Dang, didn´t know there was a difference in inxi, here goes the garuda part. If you want the full garuda-inxi I'll post it too

Garuda (2.6.12-1):
System install date:     2022-12-31
Last full system update: 2022-12-31
Is partially upgraded:   No
Relevant software:       NetworkManager
Windows dual boot:       Yes
Snapshots:               Snapper
Failed units:

And here goes my lsblk:

lsblk -f
NAME   FSTYPE FSVER LABEL              UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda
└─sda1 ntfs         Kingwin            ECD0F2B9D0F2895A
sdb
├─sdb1 ntfs         Files              EED483F2D483BAFB                      578,8G    12% /run/media/bruno/Files
├─sdb2 ext4   1.0   Backup             ef3f1cc9-5a1a-4347-9ebd-4bf72fc13b03   40,3G    78% /mnt/backup
└─sdb3 btrfs        h                  9de3e68f-3e7d-42f9-a17d-39c2e2ff09dc  482,6G     1% /home
sdc    iso966 Jolie GARUDA_DR460NIZED_TALON
2022-10-19-02-24-22-00
├─sdc1 iso966 Jolie GARUDA_DR460NIZED_TALON
│                                      2022-10-19-02-24-22-00
└─sdc2 vfat   FAT12 MISO_EFI           E328-6EBB
zram0                                                                                      [SWAP]
nvme0n1

├─nvme0n1p1
│      vfat   FAT32                    AE8F-27C9
├─nvme0n1p2
│
├─nvme0n1p3
│      ntfs         Windows            EAC6A08EC6A05D17                       40,2G    49% /run/media/bruno/Windows
├─nvme0n1p4
│      ntfs                            06580F6F580F5CB5
├─nvme0n1p5
│      vfat   FAT32                    DA4C-F536                             532,4M     0% /boot/efi
├─nvme0n1p6
│      btrfs        Garuda             3ebc8a4c-f7db-4cc9-97fb-486c2a5867b7   36,5G    24% /var/tmp
│                                                                                          /var/log
│                                                                                          /var/cache
│                                                                                          /srv
│                                                                                          /root
│                                                                                          /
└─nvme0n1p7
ext4   1.0   XPGgames           8830f6a5-bced-4e3b-812f-a0dec8e3b67e  224,4G    17% /mnt/games/XPG
nvme1n1

└─nvme1n1p1
ext4   1.0   WD                 9882705f-b186-4caa-909a-931081f6babb  111,1G    40% /mnt/games/WD

Just so that you are aware, there are advantages to snapshotting your home directory. However, there are also drawbacks that could produce unfortunate consequences.

If you store documents, projects, pictures, or videos in your home directory, new additions could be lost when you perform a system rollback of your home directory. This could end up being very destructive (if for instance) you'd put a lot of recent effort into a project and you don't keep proper backups. Your recent work could all be lost if you restored a snapshot that didn't contain all your latest revisions.

Just thought I'd mention that caveat.

But…why would you do that? Snapper isn’t like Timeshift where it rolls them back together. You would have to explicitly tell it to restore your home directory.

I'm aware of that, gotta be extremely cautious and that's actually the reason why I want to separate the home snapshot from the rest of the system. So if I have a system failure, which I will, since I'm still learning the OS itself, I can restore the system and not the home and if I screw up home, I can restore just home and not the system. I also keep a backup partition which I'm constantly updating.

I just made a partition for testing with 2 subvolumes (@test and @snapshots), it worked as intended, I could take snapshots just fine, I think now my problem is how to move my home from partition to subvolume. I'll search on that, seems like simple copy paste of my folder and mounting the subvolume in /home doesn't work..

Ya, sorry about that. That’s just me still living in the past. I still have timeshift on my machines from the original install. I’m not too quick to change things on a system that’s working well.

One of these days I’ll get with the times. :white_hair:

1 Like

One problem probably is that your home will always be in use, if you are logged in to your system. So the best way to do this modifications would be to boot a live system from USB.

Then you only have to make sure that you edit the rigth fstab. :slight_smile:

For snapper, from what I understand, the structure would be to create a @home subvolume and in that another subvolume .snapshots, i.e. the path would be @home/.snapshots. Then the only thing left to do ist move stuff to the @home subvolume and edit the fstab (i.e. add the subvol parameter)