btrfs snapshots and subvolumes

Moderator: BarryK

Post Reply
williwaw
Posts: 1960
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 172 times
Been thanked: 371 times

btrfs snapshots and subvolumes

Post by williwaw »

Imagine you work on a file over extended periods of time, repeatedly adding changes and undoing them. Then, at some point you realize: Parts of the changes you undid two hours ago would be very helpful now. And yesterday you had already changed this particular bit, too, before you trashed that design. But of course, because you regularly save your files, old changes are lost. Many people have probably experienced a situation like this before. Wouldn’t it be great if you could recover old file versions without having to manually copy them at regular intervals?

This article is useful for understanding snapshots and subvolumes. Working thru the example by actually creating the test dir and making snapshots etc has been useful for this user.
sudo and sudo chown can be ignored with QV

TerryH
Posts: 643
Joined: Mon Jun 15, 2020 2:08 am
Has thanked: 160 times
Been thanked: 161 times

Re: btrfs snapshots and subvolumes

Post by TerryH »

Earlier this week I did some basic tests to get more of a handle on how these subvolumes work and ease of swapping between them. Yesterday I went for a major change. I created a new snapshot, which became the base to then install the KDE 5 meta package(kfe5-5.27.5_1). The package is 441 MiB and expands to 1.1 GiB.
The install went well and after changing /etc/windowmanager from rox or jwm to startplasma-x11. It mainly functions very well, but there are some minor issues. Apart from the meta package, I also installed dolphin, but due to running as root, it gets permission issues. Rox is working as expected.

The main thing is with the subvolumes, I can easily boot into a standard QV with jwm/rox or to a version with KDE simply by selecting the volume at boot. The important thing is to do a new snapshot prior to the changes, to have a rollback point as changes are written to the system in real time.

Image

New Laptop - ASUS ZenBook Ryzen 7 5800H Vega 7 iGPU / 16 GB RAM

User avatar
BarryK
Posts: 2706
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 132 times
Been thanked: 739 times

Re: btrfs snapshots and subvolumes

Post by BarryK »

One change I'm intending to make for the next release, is take a snapshot automatically at the very first bootup.

That will be folder "2" and will be a reference point, as things were originally.

williwaw
Posts: 1960
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 172 times
Been thanked: 371 times

Re: btrfs snapshots and subvolumes

Post by williwaw »

TerryH wrote: Sat Apr 13, 2024 11:04 pm

KDE 5 meta package(kfe5-5.27.5_1). The package is 441 MiB and expands to 1.1 GiB.
The install went well................

I remember trying to install KDE with PPM in Tahrpup

PKGet has come a long way, kudos Barry.

Clarity
Posts: 3847
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1633 times
Been thanked: 528 times

Re: btrfs snapshots and subvolumes

Post by Clarity »

BarryK wrote: Sun Apr 14, 2024 2:53 am

... take a snapshot automatically at the very first bootup. ...

Please explain how that is different from the original IMG file, please.

Curious

Post Reply

Return to “EasyOS”