Kopia to back up btrfs snapshots to Google Storage

Hi.
My current backup strategy is to use Veeam free edition on a Windows 10 computer to back up a few VMWare ESXi VMs, and a physical Windows Server, and store the backups on a Linux SMB server with a btrfs volume.

The Linux box uses snapper to take btrfs snapshots (read-only - helps with ransomware protection), and uses snapper cleanup service to prune snapshots according to timeline retention rules.

I want to add Kopia into the mix to take an offsite copy of the data up to Google Storage.

I am trying to get clear in my head the best way to start.

I am wondering if I should let Kopia try to back up the live directory on the NAS box (that’s simplest, and I can tell it to ignore the hidden .snapshots directory), or should I point it at a snapshot? A snapshot is going to be difficult because every time Kopia runs, I would want it to look at only the latest snapshot. but at the same time, it feels like pointing Kopia at a read-only snapshot folder will at least mean Kopia can get on with its job without the next scheduled Veeam backup affecting things.

OTOH I gather Kopia ‘snapshots’ somehow before doing a backup, but it’s not using filesystem features to do that is it? and these will be very large backup files that Kopia is being asked to back up to cloud.

TL;DR: What’s the best way to use Kopia to back up existing incremental backup images (VHD, Veeam, etc.) to cloud?

I’m experimenting with something similar - I’m creating a Veeam Agent backup of my Windows box to my Linux server. I also want to backup this data (vbk and vbi files) to the cloud using Kopia. (And FWIW, I also intend to do a direct file backup of the Windows box to the cloud using Kopia.)

I’m not an expert, but if I were you, I would point Kopia to the live directory (and just make sure, that Veeam and Kopia don’t run at the same time).
I’m still experimenting what would be the best compression and block size settings for Veeam, though.

I’m thinking about doing something similar, like some way to clone my Time Machine backup drive. Although I would love to be able to create some sort of block storage to back up regarding the time machine drive, so then you can backup what is essentially an exact copy of the drive at that time. It’s definitely a similar situation that you’re looking at.

Hi carlOs and others,

I came across this thread with similar questions regarding backing up a live directory on a NAS (backed with btrfs and SMB).

My question is, whether a Kopia snapshot is atomic or not: Considering there are changes to the large live directory while taking the Kopia snapshot - how are these changes handeled?

Or can’t Kopia take care of possible changes during backup, so I have to make a snapshot on the NAS on my own and backup that snapshot?

Best,
Jan

Not out of the box. Creating and using filesystem snapshots to ensure atomicity of backup is your job. Kopia actions come in handy to help with its implementation. You run before action to take snapshot and after to destroy it.

It is actually well documented:

Should be very straightforward to do this with BTRFS.

Ok, I’ll try it that way - thanks for your quick reply.

Have a look at my macOS scripts:

It is working for me very well. I know it is not BTRFS but it is the same idea anyway.

Thanks. Having a look at these scripts was very helpful for me. However, I did it the other way round: Creating a script that creates and deletes the NAS snapshots and calls Kopia in between.

Now only one thing is left for me: Is there somewhere a description of how the config should look like, that one can call by repository connect from-config?