2

I have installed Ubuntu 14.10 with the / partition as btrfs, I want to make a snapshot of the subvolume /home occasionally. How to I proceed?

0

this might help ya out https://help.ubuntu.com/community/btrfs part of which is shown below. hope i was helpful and best luck to ya :D

How to work with snaphots in Ubuntu's layout

In order to work with snapshots of / or /home in the Ubuntu layout it is very convenient to mount the btrfs filesystem at a separate location, and work from the top of the btrfs tree, rather than from the mounted subvolumes.

sudo mount /dev/sdX# /mnt

Create snapshots

To create a snapshot use:

sudo btrfs subvolume snapshot /mnt/@ /mnt/@_snapshot

This will create a snapshot of the @ subvolume named @_snapshot located also in the top of the btrfs tree.

Rollback to a snapshot

To roll back to a snapshot, you simply need to change its name to the name that Ubuntu mounts, using:

sudo mv /mnt/@ /mnt/@_badroot
sudo mv /mnt/@_snapshot /mnt/@

and reboot.

Delete a snapshot

To delete a snapshot use:

sudo btrfs subvolume delete /mnt/@_badroot

btrfs snapshots are subvolumes in themselves, and self-contained, deleting the old @ subvolume like this is fine, provided we have a replacement.

  • How come I can't delete a snapshot with rm -rf? – user284659 Nov 12 '14 at 15:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.