MX Linux with fs btrfs and timeshift with @root and @home label partitions  [Solved]

Message
Author
Wkmaurom
Posts: 29
Joined: Sat Jul 15, 2023 3:25 pm

MX Linux with fs btrfs and timeshift with @root and @home label partitions

#1 Post by Wkmaurom »

I've been using various Linux operating systems for about 8-9 months.
On all systems, I use Btrfs.
On Fedora 39, I label the partitions as @ and @home, which are recognized by Timeshift. However, I've never been able to create @ partitions for Btrfs snapshots on MX Linux. As a result, Timeshift, which is included in the system from the start, only gives me the rsync option. How can I solve this? MX Linux for me it would be ideal. I don't really like rolling systems even though I've used openSUSE Tumbleweed a lot. At the same time I don't really like systems that are too static. I often need updated graphics/photography and geological apps and always up-to-date browsers.
So I ask, kindly, could anyone tell me how I can use my MX Linux installations with timeshift btrfs snapshots?
Thanks in advance.
Mauro

User avatar
fehlix
Developer
Posts: 12915
Joined: Wed Apr 11, 2018 5:09 pm

Re: MX Linux with fs btrfs and timeshift with @root and @home label partitions  [Solved]

#2 Post by fehlix »

Wkmaurom wrote: Tue Jan 23, 2024 4:16 pm So I ask, kindly, could anyone tell me how I can use my MX Linux installations with timeshift btrfs snapshots?
Instead of repeat here a howto, maybe watch this video Installing MX 21 with btrfs system partition and subvolumes
which would give you an idea, how this can be done within the MX Installer. The current installer is a bit newer,
but the same principle as shown. And timeshift would offer to use btrfs-mode for snapshot operations.
HTH

couldBworse
Posts: 47
Joined: Sun May 07, 2023 6:44 pm

Re: MX Linux with fs btrfs and timeshift with @root and @home label partitions

#3 Post by couldBworse »

@Wkmaurom

the link provided by @fehlix is not the only way to do this.....,but it is the video/tutorial/how-to i followed and found to be the most straight-forward,simple, and direct way to achieve true sub-vols that can be utilized by timeshift....

Wkmaurom
Posts: 29
Joined: Sat Jul 15, 2023 3:25 pm

Re: MX Linux with fs btrfs and timeshift with @root and @home label partitions

#4 Post by Wkmaurom »

fehlix wrote: Tue Jan 23, 2024 4:55 pm
Wkmaurom wrote: Tue Jan 23, 2024 4:16 pm So I ask, kindly, could anyone tell me how I can use my MX Linux installations with timeshift btrfs snapshots?
Instead of repeat here a howto, maybe watch this video Installing MX 21 with btrfs system partition and subvolumes
which would give you an idea, how this can be done within the MX Installer. The current installer is a bit newer,
but the same principle as shown. And timeshift would offer to use btrfs-mode for snapshot operations.
HTH
Thank you very much

User avatar
DukeComposed
Posts: 1506
Joined: Thu Mar 16, 2023 1:57 pm

Re: MX Linux with fs btrfs and timeshift with @root and @home label partitions

#5 Post by DukeComposed »

fehlix wrote: Tue Jan 23, 2024 4:55 pm Instead of repeat here a howto, maybe watch this video Installing MX 21 with btrfs system partition and subvolumes
which would give you an idea, how this can be done within the MX Installer.
An important point that dolphin_oracle makes in this video that may not be well understood is that the btrfs snapshots that Timeshift makes are kept locally on that same btrfs partition, and he underscores that this makes Timeshift useful as a system rollback utility, not a backup solution.

For a backup, you would want to at least export those snapshots to an external location with "btrfs send". That way in the event of a disk failure or when btrfs breaks, you have another copy of that snapshot kept somewhere other than on the broken machine.

Wkmaurom
Posts: 29
Joined: Sat Jul 15, 2023 3:25 pm

Re: MX Linux with fs btrfs and timeshift with @root and @home label partitions

#6 Post by Wkmaurom »

Thanks a lot to everyone. I had been looking for a solution for months... without success.
As soon as I have some time I'll try and update you.
Thanks

Wkmaurom
Posts: 29
Joined: Sat Jul 15, 2023 3:25 pm

Re: MX Linux with fs btrfs and timeshift with @root and @home label partitions

#7 Post by Wkmaurom »

I would like to thank everyone. I managed to install MX Linux with the method you indicated and timeshift works great.
Thank you very much @fehlix , @DukeComposed , @couldBworse

couldBworse
Posts: 47
Joined: Sun May 07, 2023 6:44 pm

Re: MX Linux with fs btrfs and timeshift with @root and @home label partitions

#8 Post by couldBworse »

DukeComposed wrote: Tue Jan 23, 2024 8:04 pm
fehlix wrote: Tue Jan 23, 2024 4:55 pm Instead of repeat here a howto, maybe watch this video Installing MX 21 with btrfs system partition and subvolumes
which would give you an idea, how this can be done within the MX Installer.
An important point that dolphin_oracle makes in this video that may not be well understood is that the btrfs snapshots that Timeshift makes are kept locally on that same btrfs partition, and he underscores that this makes Timeshift useful as a system rollback utility, not a backup solution.

For a backup, you would want to at least export those snapshots to an external location with "btrfs send". That way in the event of a disk failure or when btrfs breaks, you have another copy of that snapshot kept somewhere other than on the broken machine.
thank you for pointing this out.....

might i humbly/respectfully add that

the external disk should ideally be formatted with Btrfs to utilize the btrfs send and btrfs receive commands effectively, These commands are designed for Btrfs-to-Btrfs interactions, ensuring efficient snapshot transfer and maintaining snapshot integrity.

format:

Code: Select all

mkfs.btrfs /dev/sdX
create and mount:

Code: Select all

mkdir /mnt/external_btrfs
mount /dev/sdX /mnt/external_btrfs
something like......

send:

Code: Select all

 btrfs send /mnt/btrfs_root/@snapshots/snapshot_name | sudo btrfs receive /mnt/external_btrfs
Snapshots that you intend to move (send) to another location must be in a read-only state.
Btrfs requires snapshots to be read-only for the btrfs send command to work. mine were not read only....

create read only:

Code: Select all

btrfs subvolume snapshot -r /mnt/btrfs_root/@ /mnt/btrfs_root/@snapshots/snapshot_name
change existing to read only:

Code: Select all

btrfs property set -ts /mnt/btrfs_root/@snapshots/snapshot_name ro true

User avatar
DukeComposed
Posts: 1506
Joined: Thu Mar 16, 2023 1:57 pm

Re: MX Linux with fs btrfs and timeshift with @root and @home label partitions

#9 Post by DukeComposed »

couldBworse wrote: Wed Jan 24, 2024 4:50 pm might i humbly/respectfully add that

the external disk should ideally be formatted with Btrfs to utilize the btrfs send and btrfs receive commands effectively, These commands are designed for Btrfs-to-Btrfs interactions, ensuring efficient snapshot transfer and maintaining snapshot integrity.
You make a good point. Folks still using btrfs owe it to themselves to understand the peculiarities of btrfs send and receive, which can be described, at best, as "quirky". However, sends do not necessarily require an existing btrfs partition to receive it. If one plans to upload their snapshot to the cloud, for example, one should be able to send a snapshot to a file, "btrfs send my_snapshot > my_backup.btrfs.dat", and then store that .dat file as a single archive of data. It will be unusable in that state until it's received back into a functional btrfs partition, but it's a single file which can be stored anywhere, on any file system.

User avatar
bassplayer69
Posts: 69
Joined: Wed Dec 25, 2019 5:37 pm

Re: MX Linux with fs btrfs and timeshift with @root and @home label partitions

#10 Post by bassplayer69 »

This is a great topic. I use snapper

Code: Select all

sudo apt install -y snapper inotify-tools
and grub-btrfs https://github.com/Antynea/grub-btrfs so I can have snapshots automatically made pre and post every time I use apt to install a new package. I use grub-btrfs to be able to boot into a snapshot. I have it setup with systemd, but both work without systemd with a little more work to set it up properly.
"The world is full of kings and queens, who blind your eyes and steal your dreams. It's Heaven and Hell." - Ronnie James Dio
Linux Registered User #450992 (defunct)

Post Reply

Return to “Software / Configuration”