Btrfs Assistant 1.0 is coming, testers needed

Oh I missed that part about having a specific layout.

In that case I’ll pass LOL.

BTRFS-assistant is a great tool. I’ve recommended to few friends also.

Thank you for your help!

1 Like

I suggest you take snapshots of your home config as well. home gets a lot of changes so snapshots of home are very important. When using snap-sync as well you can copy @home to another file system in case the / crashes.

very nice script to do the job.
Still you have to create service and timers but if you put the script in let’s say /usr/local/sbin en set the permissions you can see if it works.
Only thing is that you have to change the location of /mnt/backup to you’re location. If there are alternatives to timers and services i would like to know … goodluck

1 Like

I don’t have any important data in my home folder. I mainly use Dropbox for anything important.

But thanks for sharing. I will look into it and play around with it in VM first :slight_smile:

You have the config files for virtually every application. Have you ever wished you could put the config on something back the way it was before you messed with it?

yes, all the time and that’s why I have snapshots of home every hour

1 Like

Love this program. I followed all of the thread, sorted all the path file etc, I couldn’t get any snapshot to show in grub until i ran

grub-mkconfig -o /boot/grub/grub.cfg

It seems to be working, would this be something you have to do normally? It appears to be updating with new snapshots

Letme set that up too. Sounds like a smart idea.

1 Like

It auto updates for me when there is a new snapshot.

Every now and then I manually keep a copy of .config and .local folder into an external drive. But I don’t mess with settings too often.

But good idea to keep home backup incase SSD ever crashes.

These are steps I had to take to get it working, all copied from the thread above. Hopefully it will help more nubs like myself!

Install snap-pac, snapper, grub-btrfs and btrfs-assistant

Open Btrfs Assistant
Switch to the “Snapper Settings” tab
Click on the “New Config” button
Name the config “root” and choose / as the mountpoint
Click the “Save Config” button

Set the retention limits you want. In particular you probably want to lower the amount of “Number” snapshots that are retained. These are the snapshots that are taken when pacman runs. It takes 2 snapshots in each run so something like 10 is probably a more reasonable number. That will give you 5 pacman runs. The timeline settings are entirely left to your preferences.

Select the checkboxes for snapper-timeline and snapper-cleanup and click the “Apply” button to the right of the checkboxes.

Add support for booting off read-only snapshots
Edit
/etc/mkinitcpio.conf and add grub-btrfs-overlayfs to the end of the HOOKS section
Rebuild your initrams with sudo mkinitcpio -P

Make sure the snapshots are added to the grub menu. There are two easy ways to do this. Only pick one of them
Enable the grub-btrfs.path systemd unit

Create a file with the following contents at /etc/systemd/system/grub-btrfs.path

[Unit]
Description=Monitors for new snapshots

[Path]
PathModified=/.snapshots

[Install]
WantedBy=multi-user.target

Then type

sudo systemctl daemon-reload
sudo systemctl reenable --now grub-btrfs.path

remake grub.cfg

grub-mkconfig -o /boot/grub/grub.cfg
1 Like

I don’t think you should be combining snap-pac-grub with the path unit. The path unit should be all you need.

1 Like

I only did the path unit, I will edit it.

1 Like

I have noticed that Btrfs assistant does not appear to save my settings regard snapshots. I set it to store 10, with 0 timed snapshots, when I open again, everything is set to default. So 50 total saved. I reset it but i does the same thing after reboots.
I assume something is set wrong, wondering what it could be. Not sure my explanations make total sense as it is late.

as an update.

Running

snapper get-config

shows

Key                    | Value
-----------------------+------
ALLOW_GROUPS           |      
ALLOW_USERS            |      
BACKGROUND_COMPARISON  | yes  
EMPTY_PRE_POST_CLEANUP | yes  
EMPTY_PRE_POST_MIN_AGE | 1800 
FREE_LIMIT             | 0.2  
FSTYPE                 | btrfs
NUMBER_CLEANUP         | yes  
NUMBER_LIMIT           | 50   
NUMBER_LIMIT_IMPORTANT | 10   
NUMBER_MIN_AGE         | 1800 
QGROUP                 |      
SPACE_LIMIT            | 0.5  
SUBVOLUME              | /    
SYNC_ACL               | no   
TIMELINE_CLEANUP       | yes  
TIMELINE_CREATE        | yes  
TIMELINE_LIMIT_DAILY   | 10   
TIMELINE_LIMIT_HOURLY  | 10   
TIMELINE_LIMIT_MONTHLY | 10   
TIMELINE_LIMIT_WEEKLY  | 0    
TIMELINE_LIMIT_YEARLY  | 10   
TIMELINE_MIN_AGE       | 1800 

This is what Btrfs assistant defaults to

I changed the btrfs frequency in each box to 1, with number limit 20. Saved, ran get-config again and it shows the same table as above.

Can you share a screenshot of what you are changing?

I have set my config via command line to this:

Key                    | Value
-----------------------+------
ALLOW_GROUPS           |      
ALLOW_USERS            |      
BACKGROUND_COMPARISON  | yes  
EMPTY_PRE_POST_CLEANUP | yes  
EMPTY_PRE_POST_MIN_AGE | 1800 
FREE_LIMIT             | 0.2  
FSTYPE                 | btrfs
NUMBER_CLEANUP         | yes  
NUMBER_LIMIT           | 20   
NUMBER_LIMIT_IMPORTANT | 10   
NUMBER_MIN_AGE         | 1800 
QGROUP                 |      
SPACE_LIMIT            | 0.5  
SUBVOLUME              | /    
SYNC_ACL               | no   
TIMELINE_CLEANUP       | yes  
TIMELINE_CREATE        | yes  
TIMELINE_LIMIT_DAILY   | 1    
TIMELINE_LIMIT_HOURLY  | 0    
TIMELINE_LIMIT_MONTHLY | 1    
TIMELINE_LIMIT_WEEKLY  | 0    
TIMELINE_LIMIT_YEARLY  | 1    
TIMELINE_MIN_AGE       | 1800

This is then matched in btrfs assistant:

If i then change these settings in btrfs assistant, say I change the number limit to 30 and save to systemd, this does not then update the config when i do

snapper get-config

I intially set the assistant to number limit of 12 - when looking today i found 40 on the system.

You have to click on the save button on the top right too

fml. I’m a bellend

Maybe we should remove the button to apply systemd changes and just have a single save button.

:thinking:

1 Like

I agree. When you click on save it should apply to systems too.
Nice idea