BTRFS snapshots and btrbk as a backup solution

chicagonyc

New Member
Jan 28, 2023
16
3
3
Hello,

I installed PVE 7.3 with a BTRFS file system on a small system (old Thinkpad T520 with an SSD for the system drive, and two HDDs -- the latter are directly formatted in BTRFS and exported to a Rockstor NAS VM). The performance so far has been very good.

I noticed that the installer created a subvolume at /var/lib/pve/local-btrfs (as per the wiki). I also see that subvolumes for each VM or container are created nested inside that directory.

In pondering my backup strategy, I was wondering if I could use BTRFS snapshots and a backup tool like btrbk, which is a nice integrated snapshot/backup solution I've used happily on desktop Linux. BTRFS needs subvolumes for snapshots, so I couldn't backup the host itself (which wasn't installed with a / subvolume like other distributions I've used), but it could snapshot the VMs and containers, which have their own individual subvolumes. Then btrbk can send that snapshot in an incremental fashion to external storage.

Is there a downside to what I'm thinking about? My VMs are quite small: 16Gb and 4Gb, and maybe a few more of that size in the future.
 
  • Like
Reactions: Ultranium
hello from the future... 2024... curious on how your proxmox btrfs journey has gone?

I know proxmox has nifty backup capabilities zfssend/receiv and configuration of this with any other proxmox cluster member... hopefully that comes to btrfs as well soon. How has your performance been running proxmox with btrfs?
 
Interesting to revisit this issue.

I only used BTRFS on one installation for the root partition, for future ones I used EXT. I haven't done much about backing up root, which I know I should get around to, and my plan is to use the tteck proxmox script for doing so. For backing up VMs and LXCs I started using Proxmox Backup Server which I run in its own LXC on my main server (btw storing with BTRFS too). It works great.

The reason why I didn't do too much with BTRFS is that I was worried about excessive drive wear from putting VMs on BTRFS -- you can turn off COW but it's a lot of work. I think with ZFS this is less of an issue.

Where I continue to use -- and love -- BTRFS is on my main NAS data storage. I run Fedora Server (but could have used Debian or whatever) and a plain BTRFS RAID1 filesystem over several drives. Then I back up my data to a separate RAID pool using btrbk using the capabilities of BTRFS. Each backup takes seconds (!!) and is done continuously.

So overall my strategy has evolved to doing simple stuff for root and VM/LXC storage, and BTRFS for data storage.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!