Can you explain what you mean by this? I am not following.
It looks like btrfs backup is not complete. For example, if you have xfce + i3, it restore only xfce.
That why I think that btrfs-assistant didnt took backup properly because of partitions .
So should I add the autodefrag back into fstab and accept more wear and tear on the SSD?
after research, i got this :
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
nvme0n1 259:0 0 953,9G 0 disk
âânvme0n1p1 259:1 0 1G 0 part /boot/efi
âânvme0n1p2 259:2 0 156,3G 0 part /swap
â /
âânvme0n1p3 259:3 0 781,3G 0 part /home
âânvme0n1p4 259:4 0 15,4G 0 part [SWAP]
sudo blkid
/dev/nvme0n1p3: UUID="4292804b-d282-4903-bdf6-e1f6e360dfbb" UUID_SUB="bbb87eaf-df5b-41f3-825f-4eabc33cd69a" BLOCK_SIZE="4096" TYPE="btrfs" PARTUUID="4ab01a2c-5357-5245-a419-1fa2e5181db6"
/dev/nvme0n1p1: UUID="E01B-0641" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="160ed1d8-fccd-9d40-a0a3-a5a237728a1e"
/dev/nvme0n1p4: UUID="27b4037e-7c00-47ba-8c9d-8b562fb9c9b6" TYPE="swap" PARTUUID="8c1a0516-0e4a-d14d-b0b7-deac728b46eb"
/dev/nvme0n1p2: UUID="f89930fd-5f14-48ff-8ed4-413e4ea86173" UUID_SUB="f9670c78-51b8-41b4-8968-15f8e97a15cb" BLOCK_SIZE="4096" TYPE="btrfs" PARTUUID="263fe4b3-97ca-6343-bef5-f38beef44bf9"
Looking on that, I think ( maybe I am wrong), but fstab should look like this :
UUID=E01B-0641 /boot/efi vfat defaults 0 2
UUID=f89930fd-5f14-48ff-8ed4-413e4ea86173 / btrfs subvol=/@,defaults,noatime,autodefrag 0 0
UUID=4292804b-d282-4903-bdf6-e1f6e360dfbb /home btrfs subvol=/home,defaults,noatime,autodefrag 0 0
UUID=27b4037e-7c00-47ba-8c9d-8b562fb9c9b6 none swap sw 0 0
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
I donât set it as a mount option in fstab
, I just enable it in Btrfs Assistant. In the Btrfs maintenance tab I typically hit âselect allâ for all mount points and set balance, scrub, and defrag to run monthly and donât really think much about it beyond that.
I didnât mean to suggest there is any particular approach to filesystem maintenance that anyone âshouldâ do, I just thought I would share another point of view for the sake of contributing to the discussion.
That is basically impossible. A btrfs snapshot contains the entire subvolume. It canât exclude things.
Is it possible that the snapshot you restored was before you installed i3?
Alternatively, is it because you restored /
but not /home
?
no, because I made backup of (/) only.
Also I made 4 backups in btrfs-assistant, same like on Timeshift, and ones of Timeshift are visible in grub, while from btrfs-assistant is only one.
Can you check if this is correct so I can try again from clean state ? Btrfs Assistant 1.0 is coming, testers needed - #633 by Brtza
Did you remove the swap subvolume on purpose?
Also, to know if that is correct, I would need to see sudo btrfs sub li /
and btrfs sub li /home
ID 256 gen 228 top level 5 path @
ID 257 gen 49 top level 5 path @swap
ID 258 gen 207 top level 5 path timeshift-btrfs/snapshots/2023-08-14_15-47-54/@
ID 259 gen 228 top level 256 path .snapshots
ID 260 gen 228 top level 259 path .snapshots/1/snapshot
ID 256 gen 264 top level 5 path .snapshots
ID 257 gen 264 top level 256 path .snapshots/1/snapshot
also from grub :
Detecting snapshots ...
Found snapshot: 2023-08-14 16:03:44 | @/.snapshots/1/snapshot | single | Manual Snapshot |
Found snapshot: 2023-08-14 15:47:54 | timeshift-btrfs/snapshots/2023-08-14_15-47-54/@ | ondemand boot hourly daily | N/A |
Found 2 snapshot(s)
Unmount /tmp/grub-btrfs.GAlYfgKumB .. Success
done
I donât see anything wrong there.
However a couple notes:
- You removed swap from
fstab
, are you deliberately disabling swap? - You have no subvolumes on the partition holding
/home
. You can take snapshots and restore individual files that way but it wonât possible to restore an entire snapshot.
I didnt do nothing yet.
This is how fstab looks atm :
UUID=E01B-0641 /boot/efi vfat defaults 0 2
UUID=f89930fd-5f14-48ff-8ed4-413e4ea86173 / btrfs subvol=/@,defa>
UUID=f89930fd-5f14-48ff-8ed4-413e4ea86173 /swap btrfs subvol=/@swap,>
UUID=4292804b-d282-4903-bdf6-e1f6e360dfbb /home btrfs defaults,noati>
UUID=27b4037e-7c00-47ba-8c9d-8b562fb9c9b6 swap swap defaults 0 0
/swap/swapfile swap swap defaults 0 0
tmpfs /tmp tmpfs defaults,noati>
so what to change to make both / and /home restorable from grub ?
also for swap I have swap partition
grub doesnât restore snapshots, it just boots them.
If you want to be able to restore /home
from Btrfs Assistant(or any other tool), you need to move the data to a subvolume. Currently you have you data at the root of the partition.
How to do that ?
I tried to restore one snapshot , for test, and it went not so good. after boot, only got tty.
something is wrong still. timeshift working fine
A btrfs snapshot is the same no matter if you use timeshift or btrfs assistant. Were the snapshots that you tried to restore taken at the same time? If not, it may be an issue with the state of the system at that time.
Yeah, same time⌠like 10 sec difference
A question about the Btrfs maintenance tab:
Is it better to leave the respective mountpoints at default or to select all of them?
From a purely logical point of view, everything that is btrfs should be processed, right?
For balance and scrub, if you have a single btrfs silesystem, selecting one of the mountpoints is sufficient since it only uses that mointpoint to identify the filesystem.
For defrag, I am not sure off the top of my head. I would have to research what the scope of a defrag is.
https://github.com/kdave/btrfsmaintenance
According to the link above:
Since I have nested subvolumes, I configured them inside my /etc/default/btrfsmaintenance
file:
[myuser@eos /]$ cat /etc/default/btrfsmaintenance | grep BTRFS_DEFRA
#BTRFS_DEFRAG_PATHS=""
BTRFS_DEFRAG_PATHS="/:/home:/home/myuser/.cache/mozilla:/home/myuser/.cache/thunderbird:/home/myuser/.config/Signal:/home/myuser/.mozilla:/home/myuser/.thunderbird:/var/cache:/var/log:/home/myuser/Documentos/Arquivo_Morto"
myuser@eos /]$ sudo btrfs subvolume list / | grep -v snapshot
ID 258 gen 117027 top level 5 path @cache
ID 259 gen 117339 top level 5 path @log
ID 260 gen 25 top level 1575 path var/lib/portables
ID 261 gen 26 top level 1575 path var/lib/machines
ID 262 gen 117318 top level 1576 path @home/myuser/.cache/mozilla
ID 263 gen 117126 top level 1576 path @home/myuser/.cache/thunderbird
ID 266 gen 117332 top level 1576 path @home/myuser/.mozilla
ID 268 gen 117336 top level 1576 path @home/myuser/.thunderbird
ID 420 gen 116256 top level 1576 path @home/myuser/Documentos/Arquivo_Morto
ID 1575 gen 117338 top level 5 path @
ID 1576 gen 117339 top level 5 path @home
I see BtrFS a lot.