Cloud Sync a Zvol snapshot

coolnodje

Explorer
Joined
Jan 29, 2016
Messages
66
I need to Cloud Sync a snapshot, especially a Zvol snapshot.

The Cloud Sync feature offers the possibility to sync from a Snapshot, as far as I understand the option, so it should be possible to do it in another context.

Is there any way to do this form the CLI?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
The Cloud Sync feature offers the possibility to sync from a Snapshot, as far as I understand the option
Not as far as I can see.

Is there any way to do this form the CLI?
Cloud sync tasks use rclone in the background. It's not specifically ZFS aware, so I don't think you can get it to work at anything more than the file level, meaning zvol content isn't an option.

You would need a ZFS target in the cloud in order to use zfs send | recv for zvols. Not impossible, but I'm not aware of a cloud service that offers that directly, you would need to make your own VM and sort out safe networking/SSH over which to do it.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
You can either use zfs send or dd to read the zvol (or a snapshot of it) out to a file which could then be included in some type of regular file sync (but would be a large single file containing the entire zvol contents, not a differences only file)
 

coolnodje

Explorer
Joined
Jan 29, 2016
Messages
66
The Cloud Sync feature offers the possibility to sync from a Snapshot, as far as I understand the option

I read this from a Reddit post, someone who was trying to understand what exactly was happening when you checked this option in a Cloud Sync Task.
Hope he's right, cause that makes sense to create a snapshot and sync from it.

In any case, thanks for your answer, I was mistakenly thinking that snapshot meant "file versioning".
In a case of a Zvol, ZFS allows snaphot, but of course it can't be of files contained in the zvol.
Your suggestion could work but it's not compelling in terms of implementation, and features it offers really.

The Zvol I want to sync the content of, is a Linux VM mounted volume, containing an ext4 filesystem.
I'm guessing I could make this volume a ZFS file system and create Snashot from with the VM and rclone from the VM.
(which I already do, but I have issues with the encryption of files that are updated during the sync. Hence the snapshot need)
 
Top