public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Nicholas D Steeves <nsteeves@gmail.com>
To: Ulli Horlacher <framstag@rus.uni-stuttgart.de>,
	linux-btrfs@vger.kernel.org
Subject: Re: backup best practise?
Date: Thu, 01 Jan 2026 21:37:23 -0500	[thread overview]
Message-ID: <87ikdkn3j0.fsf@digitalmercury.freeddns.org> (raw)
In-Reply-To: <20260101234624.GA1955478@tik.uni-stuttgart.de>

[-- Attachment #1: Type: text/plain, Size: 3117 bytes --]

Happy New Year Ulli!

Ulli Horlacher <framstag@rus.uni-stuttgart.de> writes:

> What is the best practise for backup of a local btrfs file system?

This problem was solved pre-btrfs and it's called the "3-2-1 backup
rule".  Yes, it also applies to btrfs; however, there is some debate
about whether a snapshot counts as a "copy" when it shares extents.  My
view is that it doesn't count, because "accidental partial deletion" is
only one class of disaster.

> In my case, I have 2 disks: disk one contains a /home btrfs filesystem,
> disk two contins a /backup btrfs filesystem.
> So far I use:
> rsync -a --delete /home /backup
>
> The drawback of this methode is: In /home there are also *big* VMs which
> will be copied every time even if they have changed only a few bytes,
> because rsync works file based.
>
> Using RAID1 is not a backup. When I inadvertently delete a file it has
> gone on the mirror side, too.
>
> I have snapshots of /home, but they will not help me if disk one has a
> hardware failure.

Agreed!  It sounds like you want fast and space-efficient backups.
There's an out of date project called "backup-bench" that compares them:

  https://github.com/deajan/backup-bench

I chose borgbackup, and it is the only backup system that I've been
happy enough with to use for more than a decade.  Here is how I apply
the 3-2-1 target to my system (adapted to use your paths).  In every
case I assume a snapshot of /home is the source.

  1. Cron-automated daily backup of /home to /backup/borg-repo (where I
     return 12 days of daily snapshots).  This has saved me from a
     PSU+SSD failure once, and an SSD failure another time.
  2. Weekly backup of /home to /mnt/external-usb-on-ext4/borg-repo, that
     is a separate target.  I have 12 years of backups here, and I
     travel with this drive.  This one is unfortunately a
     prompt+clicking a button or pluging in an external disk and letting
     a udev rule initiate the backup.
  3. I use Syncthing to maintain a live mirror of my user files
     off-site, with a data-retention policy that sacrifices a bit of
     space for a margin of error in case of accidental deletion combined
     with physical disaster affecting the primary copy.  This mesh keeps
     my laptop, desktop, and an offsite server in sync.

I'm anxious about using the cloud in the impending post-quantum era so I
don't yet have quantum-computing-safe encrypted offsite cloud backup.

If you don't know about 3-2-1, here are two references:

  https://www.backblaze.com/blog/the-3-2-1-backup-strategy/
  https://www.reddit.com/r/DataHoarder/comments/1agd73m/the_321_rule_seems_to_have_multiple/

and a possible argument against 3-2-1:

  https://www.reddit.com/r/DataHoarder/comments/11bls7l/the_321_backup_recommendation_is_flawed/

I hope this is enough to upgrade your backup strategy!  I use custom
scripts for #1 and #2, but I've started working the borgmatic maintainer
about evolving borgmatic's btrfs support to the point where I can
recommend it wholeheartedly, and you can count on me to advocate for
btrfs-related borgmatic issues.

Best,
Nicholas

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

  reply	other threads:[~2026-01-02  2:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-01 23:46 backup best practise? Ulli Horlacher
2026-01-02  2:37 ` Nicholas D Steeves [this message]
2026-01-02  7:34 ` Andrei Borzenkov
2026-01-02 10:39 ` Christoph Biedl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ikdkn3j0.fsf@digitalmercury.freeddns.org \
    --to=nsteeves@gmail.com \
    --cc=framstag@rus.uni-stuttgart.de \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox