Comments (9)
Hi @Deckweiss and thank you for the report.
Today, I've been testing the consolidation process in my own machine and it worked flawlessly. This is the log during the operation:
2021-09-24 08:51:57,438 INFO:ConfigManager. Checking OS. ARCH found
2021-09-24 08:51:57,444 INFO:ConfigManager. Checking Desktop Environment. generic found
2021-09-24 08:51:57,445 INFO:ConfigManager. Installation type: native
2021-09-24 08:51:57,445 INFO:ConfigManager. Creating PropertiesManager...
2021-09-24 08:51:57,446 INFO:ConfigManager. Migration process has finished successfully!
2021-09-24 08:51:57,447 INFO:ConfigManager. Retrieving user's configuration from buttermanager.yaml file and loading it in memory...
2021-09-24 08:51:57,447 INFO:VersionChecker. Checking for a new version of ButterManager. Please wait...
2021-09-24 08:51:57,500 INFO:PasswordWindow. Calculating appropriated base font size for UI elements...
2021-09-24 08:51:57,501 INFO:PasswordWindow. Base font size = 10
2021-09-24 08:51:57,620 INFO:VersionChecker. Last version is 2.4.2 and current version is 2.4.2
2021-09-24 08:51:59,682 INFO:RootSnapshotChecker. Checking if the current snapshot used for root is the default. Please wait...
2021-09-24 08:51:59,886 INFO:ButtermanagerMainWindow. BTRFS filesystems found in the system:
2021-09-24 08:51:59,886 INFO:ButtermanagerMainWindow. BTRFS Filesystem -> UUID: bbad1b9c-49dc-4405-9c90-b034005e673b; Devices: ['/dev/sda2']; Mounted Points: ['/', '/mnt/defvol', '/home']
2021-09-24 08:52:04,350 INFO:ConsolidateSnapshotWindow. Consolidating default root snapshot. The system has booted in /mnt/defvol/snapshots/root-20210924-0 and it will be consolidated into /mnt/defvol/@
There is something that caught my attention comparing my log with yours and it is the line
2021-09-24 08:52:04,350 INFO:ConsolidateSnapshotWindow. Consolidating default root snapshot. The system has booted in /mnt/defvol/snapshots/root-20210924-0 and it will be consolidated into /mnt/defvol/@
As you can see, the destination is /mnt/defvol/@ but there is no destination in your log. This is my configuration file:
aur_repository: 0
check_at_startup: 1
grub_btrfs: 1
path_to_consolidate_root_snapshot: '@'
save_log: 1
snap_packages: 1
subvolumes_dest: /mnt/defvol/snapshots/|/mnt/defvol/snapshots/
subvolumes_orig: /mnt/defvol/@/|/mnt/defvol/@home/
subvolumes_prefix: root|home
subvolumes_snapshots_to_keep: 2|1
Could you share yours? I suspect there is no value for path_to_consolidate_root_snapshot parameter.
Thanks! :)
from buttermanager.
These are the settings
aur_repository: 0
check_at_startup: 0
grub_btrfs: 1
path_to_consolidate_root_snapshot: _active/root
save_log: 1
snap_packages: 0
subvolumes_dest: /mnt/defvol/_snapshots/|/mnt/defvol/_snapshots/
subvolumes_orig: /|/home/
subvolumes_prefix: root|home
subvolumes_snapshots_to_keep: 3|3
I did a fresh install now and it works, I have kept the same setting file and tried booting into a snapshot.
I feel like @ might be a fallback value if the buttermanager doesn't find the configured one.
It is probably my bad for trying to restore a backup manually by following https://github.com/digint/btrbk#restoring-backups
And something in that guide is not compatible.
The difference seems to be that after restoring with buttermanager, the / is still a subvolume, while with btrbk guide it became a snap
from buttermanager.
Hi @Deckweiss
Thanks again for the feedback and I'm glad that on a fresh installation everything works fine.
Yes, it's totally possible that if you were tinkering with several BTRFS tools, something could cause collateral effects.
Again, thanks for your interest in ButterManager :)
from buttermanager.
Hi @egara
Today, I had a bug after updating the system, so I wanted to restore a previous snapshot and I have the same error as in this issue. This time, I strictly followed your guide and did not fuck around with the subvolumes. I also restored a snapshot at some point in time on this very setup and it worked fine, but now it is broken for some reason.
commandline output:
deckweiss@BIG-Chungus:~$ buttermanager
[sudo] password for deckweiss: btrfs subvolume snapshot: exactly 2 arguments expected, 1 given
btrfs subvolume show: exactly 1 argument expected, 0 given
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/buttermanager/buttermanager/window/windows.py", line 275, in consolidate
commandline_output = subprocess.check_output(command, shell=True)
File "/usr/lib/python3.9/subprocess.py", line 424, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.9/subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['sudo btrfs subvolume show ']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/buttermanager/buttermanager/window/windows.py", line 278, in consolidate
str(called_process_error_exception.reason))
AttributeError: 'CalledProcessError' object has no attribute 'reason'
Aborted
buttermanager.log:
2021-11-10 12:39:31,703 INFO:ConfigManager. Checking OS. ARCH found
2021-11-10 12:39:31,703 INFO:ConfigManager. Checking Desktop Environment. kde found
2021-11-10 12:39:31,703 INFO:ConfigManager. Installation type: native
2021-11-10 12:39:31,703 INFO:ConfigManager. Creating PropertiesManager...
2021-11-10 12:39:31,704 INFO:ConfigManager. Migration process has finished successfully!
2021-11-10 12:39:31,704 INFO:ConfigManager. Retrieving user's configuration from buttermanager.yaml file and loading it in memory...
2021-11-10 12:39:31,704 INFO:VersionChecker. Checking for a new version of ButterManager. Please wait...
2021-11-10 12:39:31,721 INFO:PasswordWindow. Calculating appropriated base font size for UI elements...
2021-11-10 12:39:31,721 INFO:PasswordWindow. Base font size = 10
2021-11-10 12:39:31,923 INFO:VersionChecker. Last version is 2.4.2 and current version is 2.4.2
2021-11-10 12:39:35,248 INFO:RootSnapshotChecker. Checking if the current snapshot used for root is the default. Please wait...
2021-11-10 12:39:35,413 INFO:ButtermanagerMainWindow. BTRFS filesystems found in the system:
2021-11-10 12:39:35,413 INFO:ButtermanagerMainWindow. BTRFS Filesystem -> UUID: 8d49b3d9-7842-4db7-bc15-bbf64b8771e2; Devices: ['/dev/nvme1n1p2']; Mounted Points: ['/', '/home', '/mnt/defvol', '/var/lib/anbox/rootfs/cache', '/var/lib/anbox/rootfs/data']
2021-11-10 12:39:37,060 INFO:ConsolidateSnapshotWindow. Consolidating default root snapshot. The system has booted in /mnt/defvol/_snapshots/root-20211109-1 and it will be consolidated into
2021-11-10 12:39:37,060 INFO:Subvolume. Deleting subvolume from origin /. Please wait...
2021-11-10 12:39:37,060 INFO:Subvolume. Deleting subvolume from origin /. Please wait...
2021-11-10 12:39:37,070 INFO:Subvolume. Snapshot / deleted.
2021-11-10 12:39:37,070 INFO:Subvolume. Snapshot / deleted.
btrfs-list output (currently booted into _snapshots/root-20211109-1):
NAME TYPE EXCL MOUNTPOINT
8d49b3d9 fs 227.70G (single, 698.00G free)
[main] mainvol - /
_active subvol -
_active/root subvol -
_snapshots/root-20211108-1 snap -
_snapshots/root-20211109-0 snap -
_snapshots/root-20211109-1 snap - /
_snapshots/root-20211110-0 snap -
_snapshots/root-20211110-1 snap -
_active/home subvol - /home
_snapshots/home-20211108-1 rosnap -
_snapshots/home-20211109-0 rosnap -
_snapshots/home-20211109-1 rosnap -
_snapshots/home-20211110-0 rosnap -
_snapshots/home-20211110-1 rosnap -
_snapshots subvol -
btrfs-list output (normal boot):
NAME TYPE EXCL MOUNTPOINT
8d49b3d9 fs 228.31G (single, 696.39G free)
[main] mainvol - /
_active subvol -
_active/root subvol - /
_snapshots/root-20211108-1 snap -
_snapshots/root-20211109-0 snap -
_snapshots/root-20211109-1 snap -
_snapshots/root-20211110-0 snap -
_snapshots/root-20211110-1 snap -
_active/home subvol - /home
_snapshots/home-20211108-1 rosnap -
_snapshots/home-20211109-0 rosnap -
_snapshots/home-20211109-1 rosnap -
_snapshots/home-20211110-0 rosnap -
_snapshots/home-20211110-1 rosnap -
_snapshots subvol -
I have the project cloned and tried stepping in with the debugger, but it was difficult to understand for me. It seemed like some variables just weren't there at all. If you want to take a look at it yourself, let me know.
Thanks and cheers
from buttermanager.
Hi @Deckweiss
Oh, again this error :(
Could you attach again the config file please? (it is in ~/.buttermanager/buttermanager.yaml)
It seems that it doesn't find where to create the consolidated snapshot when restoring.
Thanks!
from buttermanager.
Here is the buttermanager.yaml (git doesnt allow yaml file extensions, so I pasted the content)
aur_repository: 1
check_at_startup: 0
grub_btrfs: 1
path_to_consolidate_root_snapshot: _active/root
save_log: 1
snap_packages: 0
subvolumes_dest: /mnt/defvol/_snapshots/|/mnt/defvol/_snapshots/
subvolumes_orig: /|/home/
subvolumes_prefix: root|home
subvolumes_snapshots_to_keep: 5|5
from buttermanager.
Hi! This is my configuration file:
aur_repository: 0
check_at_startup: 1
grub_btrfs: 1
path_to_consolidate_root_snapshot: '@'
save_log: 1
snap_packages: 1
subvolumes_dest: /mnt/defvol/snapshots/|/mnt/defvol/snapshots/
subvolumes_orig: /mnt/defvol/@/|/mnt/defvol/@home/
subvolumes_prefix: root|home
subvolumes_snapshots_to_keep: 2|1
I think this is the relevant line:
subvolumes_orig: /mnt/defvol/@/|/mnt/defvol/@home/
Ok, Try to change this line. Instead of pointing directly to / and /home use the path to the actual subvolume location. In your case, I guess it should be subvolumes_orig: /mnt/defvol/_active/root/|/mnt/defvol/_active/home/ (Please, check it out before).
Then, reboot the system and boot into a previous snapshot. Then, try to consolidate and tell me.
Best,
Eloy
from buttermanager.
This did the trick!
Thank you for your support ❤️
from buttermanager.
Hi @Deckweiss
Great!! I have to implement a way to restrict this. I mean, when a user configures a subvolume to create a snapshot in ButterManager, he/she selects / as origin. This is a very natural way of thinking. But it is not correct, because it is only the mount point and the original subvolume is below main BTRFS volume with ID 5. Because of this. it is necessary to have a mount point for volume 5 (for example, at /mnt/defvol). Then, if active root subvolume is /mnt/defvol/_active/rootvol, then origin should be this.
I want to implement a wizard in the next big release of ButterManager that do all this stuff automatically.
Meanwhile, I have to introduce some checks when user defines a subvolume to create snapshot for root partition and complete the documentation in order to explain all better.
Best,
Eloy
from buttermanager.
Related Issues (20)
- App not launching HOT 13
- Main tab not updated when switching filesystem HOT 2
- [Feature Proposal] Show snapshot-exclusive files size HOT 7
- RFE: PAM integration HOT 3
- AUR package depends on grub-btrfs HOT 1
- Taking snapshot does not work when manually deleted a previous of the same day HOT 1
- Snapshot error in logs HOT 6
- Error if sudo is not found HOT 4
- 'unknown': I need something more specific. HOT 4
- TypeError: load() missing 1 required positional argument: 'Loader' HOT 5
- Consolidation not working if docker uses btrfs subvolumes HOT 3
- Not working anymore after GRUB update HOT 5
- Font size very small after upgrade to 2.5 HOT 1
- Any conflicts with other GUIs? HOT 1
- Snapshot not taken : issue with spaces in name ? HOT 5
- Updated system, error HOT 2
- Fatal error when starting up: `ValueError: invalid literal for int() with base 10: ''` HOT 4
- Don't depend on grub HOT 3
- built/installed, errors out from cli, nothing from gui HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from buttermanager.