[rear-users] Btrfs subvolume snapshots backup and restore

Johannes Meixner jsmeix at suse.de
Tue Sep 24 17:45:47 CEST 2013


I was asked whether or not Rear can be used to backup and
restore a system with btrfs filesystems that have subvolumes
which contain snapshots.

The request is to also have all the snapshots back.

Because I am not at all a btrfs expert I would like to get
some more information or feedback here.

Version 1.15.0 (September 2013)
Deal with BTRFS subvolumes correctly (issue #233 and #252)
Version 1.12.0
(NEW! EXPERIMENTAL!) Basic btrfs file system backup and restore works.
Advise is not to trust it (yet).

Since Rear 1.15.0 it should work that Rear re-creates the disk layout
when btrfs file systems with subvolumes are used.

On first glance it seems when there are btrfs subvolume snapshots,
all what the admin must do is that the data in the snapshot
subvolumes is accessible by the backup program when he wants
to also have all his snapshots back after a system recovery.

But because btrfs snapshot data is not a copy of the files
but only of the changes (via btrfs' copy on write functionality),
the backup program would backup the content of the files twice
(the original file and the same content via the btrfs snapshot)
so that a restore would need basically twice as much disk space
(under the assumption that there are only little changes).

Therefore I wonder if the request for backup and restore
of btrfs subvolume snapshots actually makes sense
from a low-level btrfs point of view?

>From an end-user point of view that request makes sense because
the admin may make btrfs snapshots only from time to time when needed
and even after a system recovery he may not want to lose his ability
to go back to this or that older btrfs snapshot state.

Kind Regards
Johannes Meixner
SUSE LINUX Products GmbH -- Maxfeldstrasse 5 -- 90409 Nuernberg -- Germany
HRB 16746 (AG Nuernberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer

More information about the rear-users mailing list