Is btrfs suitable as backup filesystem

backupbtrfsexternal-hddfilesystems

Right now I have a pretty traditional backup filesystem structure on top of ext4. Every time a backup is made, a new folder backup-DATE is created to which files are rsync'ed (with hardlinks made using rsync's --link-dest option).

Since I have read about bitrot, I would like to have a checksum for all files, transparently. Apparently ext4 cannot do that, but btrfs does offer support for data checksums (and even a built-in RAID1 mode). For a start, I would like to use btrfs as a "dumb" filesystem which supports data checksums without using its advanced features such as RAID, subvolume snapshots, send/receive, etc.

However, their wiki do not really inspire confidence in the filesystem for backups purposes:

"While many people use it reliably, there are still problems being
found. You should keep and test backups of your data, and be prepared
to use them." – Getting Started

"Is btrfs stable? Long answer: [..] Whatever you do, we recommend
keeping good, tested, off-system (and off-site) backups." – FAQ.

My use case is to have an offline backup. For that reason the disk will see very little use (as in hours) and will be frequently plugged/unplugged (eSATA or USB 3.0). Having a reliable filesystem is a must. It must not be worse than ext4 wrt. power failures, unclean shutdowns, etc.

Is it actually recommended to use btrfs as filesystem for backup purposes? Are there other properties of btrfs which may make it less (or more) suitable?

Best Answer

I will just provide a short answer because I think this is being overthought.

If you read the main kernel wiki about the btrfs (sub-)commands, you will find that there are two commands for:

  1. making a "backup": btrfs-send
  2. and restore: btrfs-restore

Just in case, this means that it is not (designed to be) a backup, but to be an snapshot filesystem, with the idea of rolling back if needed, not as a backup but as "flexible".

Therefore — no, do not use it as backup — use it as a versioned filesystem where you can test things and go back. Don't rely on it.

Related Question