Timeshift & grub-btrfs.path

@varikonniemi As far as I remember, the Phoronix Bcachefs test overtook BTRFS only when working with some databases and the speed of launching applications, but in many respects was inferior. Bcachefs obviously fewer users and the lack of reports about problems may be due to this.
The problem is that this test was carried out for a long time, as soon as this file system was added to the kernel from that moment on there were many changes and the situation could improve, but I did not find new tests. Also, if you read the appropriate section on Reddit and the repository on GitHub, you will notice that people can have problems with it.
There are still a number of shortcomings: there is no GRUB support, there is no Scrub, there are no convenient graphic tools, there is no way to boot into the system snapshot, and some more things. Perhaps this will be a good file system in a few years, but now it is doubtful.

1 Like

Do you have more informations about it?

Where it fails and what makes Rsync different?

Because i had no problem in the past with duplicated my home folder from PC to Laptop as my Laptop was new and i could just copy+overwrite the full home partition with the Timeshift Rsync that i created on my external drive.

Since then i thought that Timeshift Rsync is still a good backup solution, even when i see the own Developer from Timeshift was talking against it.

I just know today after the second Topic that i posted above, that BTRFS and Rsync snapshots are the big difference and i think the developer just didn’t draw the clear line between this both snapshot features.

try to use the test where bcachefs was not in debug mode https://www.phoronix.com/review/bcachefs-benchmarks-linux67

Only DIO was bad performance. It was a bug that has since been fixed. Other than that, bcachefs performed well, and even won some tests.

Interesting to see what the numbers would be today as it has matured significantly since kernel 6.7 that was benchmarked.

I saw these tests too ,but they were made shortly after the first one and do not include subsequent corrections.
For me the result did not change in some areas better, in some not, need to understand that some of the tests, for example working with databases, are not very important for home use, and bcachefs loses the I/O tests.
New tests are needed that would take into account the many fixes in btrfs and bcachefs.

Ok, iv been studying btrfs for a couple of days now, but i have a couple of questions that i really need a person who knows what they are doing to give an opinion on (GPT 4o is great and all but often misguided, lol).

If I have 2 devices, one has a btrfs partition and OS installed, the other has ext4 and also has an OS installed (the same OS actually, Manjaro KDE). What I want is to move the btrfs OS to the other device and have it also be btrfs. So basically to move my btrfs OS to a new btrfs device. I have thought that I might do the following:

  • Wipe the ext4 partition,
  • Add this empty device to the btrfs volume so they become a single volume and hopefully it should also have been turned into btrfs automatically at this point.
  • Wait for it to balance.
  • Then remove the old device from the volume so just the new device holds the OS.

I should then be able to wipe/remove the first device as it is no longer part of the volume. The volume now resides on a new btrfs device.

Now I might see some problems. Would the fstab in this OS be pointing at incorrect UUIDs, would the bootloader work? Would GRUB need changing?

Is this a good or bad way to move this OS from one device to another like this?

Net v quick question:

  • Can Rescuezilla can backup & restore Btrfs partitions? (just curious).

Well, I don’t quite understand the problem, should the first disk remain or will it be deleted later? I’ve honestly never done this before, but btrfs-replace might be something you need to look into.
If this doesn’t work for you, then it might be worth creating a new thread for this specific question or asking in the appropriate reddit section. Of course, you can probably completely clone an entire disk partition with any suitable utility (dont know about Rescuezilla) .
If you completely change the drive, you will still need to update fstab and grub, since the links will be incorrect.
upd: I found information about the btrfs-clone tool, but I can’t say anything about its reliability.
Perhaps this answer will also help you.

well basically i want to move a btrfs file system and the os on it to another disk and then boot to that disk.

Im following the ideas from here but just wanted a second opinion that im not completely misunderstanding anything to badly.

That is a way to send over a whole filesystem, snapshots and all, but it would be a very slow process. btrfs balance can be a slow process to create the mirror, especially when there are HDD(s) involved. This also adds the requirement of having exactly the the same partition size on both ends.

Since you are using Timeshift/brtfs, I would just create a snapshot and use that one when you’re ready. Then just send a single snapshot over.

I’ve only ever used Clonezilla, but that was a long time ago and only for Windows machines. I wouldn’t dream of it for any of the common Linux filesystems.

If you went the send a single snapshot route, with btrfs you do have some cool options as well. But I do all the steps on the command line, which really only is a few commands. Without more information I can’t give you them. lsblk -f would be the most useful to start, and saying which is what.

The UUIDs will all remain the same if you send a snapshot. Then a simple chroot’d sudo update-grub, but I do not know your layout, and your BIOS boot drive (or are you just pointing that to the new one?).

This topic has veered so much from the original post, I want to keep it brief.

I can think of examples that rsync would fail, that would not affect you. (Most are for enterprise systems, or low level tinkerers like I used to be.)

But Timeshift is cool the way it stores your data, and makes symlinks to files it already has. Using it with ext4, I can even get behind. If you don’t want to bother with other options, as this works for you, also great.

The efficiency, and even reliability, of it drives me mad. When you have btrfs, you lose all of it’s great benefits of it going this route.

1 Like

Using a reliable cloning tool such as CloneZilla will do this, irrespective of whatever partitions or filesystems exist on the disk; a byte-for-bye clone, either disk-to-disk or using a cloned image as an intermediary.

So many options !! , I hear you but i had thought of just doing the obvious method of sending a snapshot but the problem is the target system is running on ext4 and so i could not just “use” or restore the snapshot. I would have to format the partition to be btrfs first and then maybe see what i can do so swings and roundabouts. The method im looking at has been mentioned a couple of times actually, i found a link to a very similar post in one of your links.

Cool, this is handy to know, not that id be using clonezilla any more if i moved to btrfs but i might like take an image while im still in the early days.

In the end the problem here is choice^ , there are just so many options when you start to look at zfs and btrfs systems, and that’s a good thing, kinda :stuck_out_tongue: (as long as you do understand exactly what you are doing!)

Many of those actually using BTRFS probably don’t have that prerequisite; possibly only having tried it because some BTRFS Fan Boy/Girl made it sound really kool. :joy_cat:

I might try it myself - one day - until then EXT4 serves me well enough.

lol yea maybe, in may case i have been tinkering with ZFS on my truenas for a year or so and I’m also extremely lazy, so the snapshots over time in the way these file systems do is just great (right up until the point where you bork you whole system and network (somehow, who knows)). I might be lazy but i also get bored and just start looking at things for no more reason than “hmm…I wonder…”

Yes in that blog they just miss out the making the partition and filesystem.

And I said, btrfs balance which is technically wrong, but that is essentially what happens in the background, when you remove the old device. As you read, he says:

Removing the old device takes a lot longer but the command is just as simple:

My words were along the same line. :wink: But yes you still have to make a btrfs filesystem, e.g. sudo mkfs.btrfs /dev/..., you can do right over top of the ext4 one.

Or a lot of people use the parted GUI to do both at once, but I think you would have to delete and remake the partition that way.

That is fairly easy step wise, and you get all your snapshots you currently have.

Just to give you an idea, the way I send a single snapshot over is just something like this

The new btrfs FS gets mounted somewhere, with subvol=@ , and it takes just:
btrfs send timeshift-btrfs/snapshots/2024-06-07_00-00-00/@ | btrfs receive /mnt

Either works. The above happens really quick, the other way brings everything.

I was just watching a video and now im scratching my head again. He says that he just edits fstab to point his / to any snapshot and then reboots but surly that cant work. Firstly in his fstab he has

IUUID=ceBSZled 842-4dcf-8dfd-7ch34855353F / btrfs rw, relatime, ssd, space_cache, subvolid=288, subvol=@ 0 0

But surly you cant just change the subvolid but leave the subvol pointing to a different subvol?

More importantly, you cant use the snapshots like that because the snapshots are read only (from what iv read) not rw so god only know what would happen if you tried to boot from it like that?

this vid at timestamp

This is kind of what Timeshift (btrfs) restore does. And specifying the subvolid, or the subvol (name), do the same thing in this case. With Timeshift, it’s a little cleaner, and /etc/fstab (and /boot/grub/grub.cfg) remain unchanged.

When you Timeshift restore, I believe, you can think of it as essentially just renaming the subvolumes.

I actually used the restore last week, here’s what it looked like after:

sudo btrfs sub list /                                                                                              ✔
ID 256 gen 708845 top level 5 path timeshift-btrfs/snapshots/2024-05-29_15-03-50/@
ID 257 gen 703221 top level 5 path timeshift-btrfs/snapshots/2024-05-29_15-03-50/@home

 ...
 ... 

ID 710 gen 703218 top level 5 path timeshift-btrfs/snapshots/2024-05-28_12-46-50/@
ID 711 gen 703217 top level 5 path timeshift-btrfs/snapshots/2024-05-28_12-46-50/@home
ID 714 gen 709006 top level 5 path @home
ID 715 gen 709005 top level 5 path @
ID 716 gen 708845 top level 5 path timeshift-btrfs/snapshots/2024-05-31_00-11-45/@
ID 717 gen 704395 top level 5 path timeshift-btrfs/snapshots/2024-05-31_00-11-45/@home

The first snapshot pair, used to be the regular subvol names: @ and @home. It also gets the Timeshift comment: Before restoring '2024-05-29_12-46-50' (so you can always go back). But those subvol names are now on ID 714 & 715.

<rant>
In that video, there’s a lot of terminology, and things he gets wrong in that video. Some are minor like calling it deduplication, that’s something else entirely. It’s copy on write (CoW), which is also why everything seems almost instant for these commands. He also goes on to say things like, “I don’t trust it’s (btrfs’s) striping capability”. It’s been stable for many years! But I could go on about a lot misinformation here.

Also, In his snapshot restore example, he used @home. But for @, there are more steps.
</rant>

Timeshift’s default is read/write snapshots, and many people do not prefer this. The package extra/grub-btrfs is not part of Timeshift. But it detects snapshots, and let’s you boot them. This is a part that can possibly create a mess, especially if you continue booting into these snapshots moving forward. (It will appear to work, and I’ve used it for emergencies… With care!).

But it’s easy to set them as read only though with just:

sudo btrfs prop set /mnt/timeshift-btrfs/snapshots/<SNAPSHOT>/@ ro true
sudo btrfs prop set /mnt/timeshift-btrfs/snapshots/<SNAPSHOT>/@home ro true

Is this all another tangent from moving your volumes to another drive? Because this doesn’t exactly help you move anything across filesystems.

2 Likes

btrfs-asistant also needs snapper and snap-pac.

I actually just found out that the timeshift snapshots are not created read-only. So it looks to me like timeshift specifically does not set them as read-only, the oppersit to what the Btrfs wikis and manuals say. Okay, that’s fine, now I know.

sudo btrfs subvolume list -r / is empty, so they are all rw.

Yea its another completely off tangent question :P. I have already marked this thread as solved, it’ll be closed in a few days and i just hate opening new posts for every little stupid question of mine, but yea i know i should really.

I do appreciate the help though :slight_smile:

It is really easy:

  • Create a new rw-Snapshot from an ro-snaposhot you selected
  • Then boot into this one
    :footprints:

Sure i understand that which is why i ask. This chap is supposed to know what he’s doing and this just threw me because in my head he must have been wrong. I just needed to be sure that i had it right, or was he somehow right, in which case i would have to rethink something that id missed.

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