With btrfs hitting production in Oracle EL 14th this month (together with working fsck and scrubbing from Linux 3.2) I was thinking of redesigning my current backup solution to utilise it. Note that I'm thinking about doing it for small amounts of data, less than 10TB, that's fairly static (less than 1% changed daily). In short a SMB/SOHO backup solution.
What the backup should do:
- do a LVM snapshot of ext[234]/XFS/JFS on the production server
rsync
/transfer changed data to btrfs on backup server- snapshot the btrfs filesystem
- drop old snapshots when free space is running low
Pros:
- All files easily available, no decompression or loop mounting needed
- Past snapshots also easily available...
- ... so I can share them as read-only Samba shares (with shadow copy support)
- Snapshots take minimal amount of space thanks to copy-on-write (snapshot without changes takes literally few KiB on disk)
- High backup consistency: checksums on files, scrubbing of all data and built-in redundancy
Questions:
- Is there some backup solution (in form of Bacula, BackupPC, etc.) that is, or can be easily made, aware of copy-on-write file system?
- Or will I need to use in-home
rsync
solution? - What do people with ZFS boxes dedicated for backup do to backup their Linux machines?
cons
! One of them would be that Btrfs snapshots are only equivalent to incremental backups (no physical copy per backup of your file on the disc). Which could be of importance when facing disk surface issues. Note that you can force one duplication with native RAID1 support included in Btrfs.pro
-- more than two copies are not really needed if you've got checksums and actively scrub the FS, three will probably come with RAID6 support. As I've said, it's a setup for dedicated backup system, not "backup" copies inside the FS on single computer. That would be "RAID is not backup" and "snapshots are not backup".cp -a
andrsync
are for that...rsync -a --delete /home/user /mnt/butterfs/backups/ && snapper create
– apart from creating a snapshot after backing up, what do you mean by COW-aware?rsync
without--inplace
you'll get multiple copies of the same data in the remote file system. (rsync normally copies data to a temporary hidden file and then moves it over the old file, with a Copy-On-Write file system you get two copies on unchanged data this way)