You are not logged in.

#1 2015-06-03 01:25:14

devinmcelheran
Member
Registered: 2014-11-30
Posts: 16

Backup Btrfs System

After looking into it, I feel like a snapshot is what I want. But I don't just want to create a snapshot, I want to back it up onto another non btrfs disk. What would be the best way of going about that?

Offline

#2 2015-06-03 01:33:23

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Backup Btrfs System

Not a Sysadmin issue, moving to NC...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2015-06-03 01:51:24

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: Backup Btrfs System

Look at btrfs send/receive or Snapper

Scott

Offline

#4 2015-06-07 04:29:44

grandtheftjiujitsu
Member
Registered: 2013-07-27
Posts: 91

Re: Backup Btrfs System

I use btrfs but I wasn't familiar with send / receive until I took a quick look at the Oracle Documentation.  As far I can tell, btrfs still can't send a snapshot to another non-btrfs filesystem; or have I missed something?

At any rate devinmcelheran... you can set up a cron job to take incremental snapshots,  If you want your backup to be on a different filesystem than btrfs you could do similarly (with cron and a shell script) but rather than use the "btrfs snapshot" function, use tar or rsync.

Offline

#5 2015-06-07 18:11:09

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: Backup Btrfs System

grandtheftjiujitsu wrote:

As far I can tell, btrfs still can't send a snapshot to another non-btrfs filesystem; or have I missed something?

The first examle given:

btrfs send [-v] [-f sent_file] ... subvol

The -f flag dumps the BTRFS filesystem or subvolume to a binary file that can be stored on any filesystem. You can then reverse the process to restore the BTRFS filesystem or subvolume from that dump file. The downside is that you won't be able to retrieve individual files from your backups, but then again, ideally you'd be able to just mount a snapshot and grab the file from that anyway.

Offline

#6 2015-06-08 02:53:06

grandtheftjiujitsu
Member
Registered: 2013-07-27
Posts: 91

Re: Backup Btrfs System

@ANOKNUSA  oh geez... *blush *  sorry bout that.  Thanks for clarifying, good to know for the future.

Offline

#7 2015-06-08 16:04:36

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: Backup Btrfs System

Not a problem, I actually didn't even know BTRFS had this feature myself. I back up my FreeBSD ZFS filesystem to a Linux NAS the same way, so that's how I recognized it. The various "send/receive - receive/send" features don't work like a typical "copy all my files" backup, so I had to try it a few times before I actually got how it worked. wink

Offline

Board footer

Powered by FluxBB