-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does this tool support online rollback? #37
Comments
Yes, online rollback is supported. The You will need to review the script and run it manually (or type in the commands one by one). It can be run from the system mounted on the root which you want to roll back. After you run the script, the system will continue to function with the current snapshot until you reboot, upon which the rollback will take effect. For rollback to work correctly, root should be mounted (in fstab) with |
Also fyi, here's an example of rollback script it generates. This should clarify exactly how the rollback process works. Command - $ yabsnap rollback-gen 20240728183030 Output - #!/bin/bash
# Save this to a script, review and run as root to perform the rollback.
set -uexo pipefail
mkdir -p /run/mount/_yabsnap_internal_0
mount /dev/mapper/luksdev /run/mount/_yabsnap_internal_0 -o subvolid=5
cd /run/mount/_yabsnap_internal_0
mv @home @.snapshots/rollback_20240728192848_@home
btrfs subvolume snapshot /.snapshots/@home-20240728183030 @home
mv @ @.snapshots/rollback_20240728192848_@
btrfs subvolume snapshot /.snapshots/@root-20240728183030 @
echo Please reboot to complete the rollback.
echo
echo After reboot you may delete -
echo "# sudo btrfs subvolume delete /.snapshots/rollback_20240728192848_@home"
echo "# sudo btrfs subvolume delete /.snapshots/rollback_20240728192848_@" |
Thanks. Please consider letting the user do rollbacks without saving the script as this is quite cumbersome. After all the operation is reversible, maybe just inform the user of the changes after they're done and allow them to undo it if they want. |
Not clear from the documentation and I don't have an arch btrfs system to test. Would you be able to rollback the mounted root subvolume in place? Also, if I were booted into a snapshot, the rollback script would rollback the root subvolume, correct?
The text was updated successfully, but these errors were encountered: