egara / buttermanager

ButterManager is a BTRFS tool for managing snapshots, balancing filesystems and upgrading the system safetly.
GNU General Public License v3.0
129 stars 6 forks source link

Snapshot not taken : issue with spaces in name ? #50

Open lapineige opened 1 year ago

lapineige commented 1 year ago

Version : Buttermanager 2.5.0

Hello,

I have selected 3 subvolumes. One include 2 spaces in its name (both subvolume and folder).

If I want to snapshot it, it fails. I have no log file (why ? :thinking:) so I can't share it.

But from the command line: btrfs subvolume snapshot: exactly 2 arguments expected, 4 given

I suppose its the spaces that are causing trouble… what do you think ?

I believe you need to escape the spaces :)

egara commented 1 year ago

Hi @lapineige

Thanks again for your feedback. Yes, it seems something related with white spaces. I'll check it out because maybe simply using "" between the snapshot's name this error can be avoided.

lapineige commented 1 year ago

I have another bug, I don't know if it's linked : in the list of 3 subvolumes, I want for one of them to keep only one snapshot, and for the rest not to remove any of them automatically. But if I uptick "Don't delete any snapshot" and set the number to keep to whatever I like (here : 1), and save, then the option is ticked again (while showing the number to keep setting) and this doesn't work.

egara commented 1 year ago

Hi again!

Could you attach here your configuration file which is in ~/.buttermanager/buttermanager.yaml? Thank you! By the way, if you want to change this setting while I take a look, you can directly change this yaml file and use -1 value to set "Don't delete any snapshot". For example:

subvolumes_prefix: root|home
subvolumes_snapshots_to_keep: 2|-1

In this case, Buttermanager will keep all the snapshots created for home subvolume.

lapineige commented 1 year ago

Here it is. I had to change the name (but it's the same syntax) for privacy :)

aur_repository: 0 check_at_startup: 1 font_size_increment: 3 grub_btrfs: 1 path_to_consolidate_root_snapshot: 0 save_log: 1 snap_packages: 0 subvolumes_dest: /snapshots/|/snapshots/|/snapshots/ subvolumes_orig: /home/|/home/pseudo/Some Folder With Space/|/home/pseudo/.anotherfolder/ subvolumes_prefix: buttermanager_Home|buttermanager_FolderWithSpace|buttermanager_AnotherFolder subvolumes_snapshots_to_keep: -1|-1|1

you can directly change this yaml file and use -1 value to set "Don't delete any snapshot"

As you can see it is the case, but it doesn't work. At least it means it was registered correctly :)

egara commented 1 year ago

Hi! I have been testing the issue and you are right, it doesn't work. I think I have to implement some mechanism to detect and escape the blank spaces as you mention before.

I'll take a look into the code in order to fix this issue. Thanks!