# How to send differentials between zfs snapshots between servers?



## zennybsd (Mar 5, 2012)

Hi:


I shall appreciate if anyone could explain how to send/receive binary differentials between two zfs snapshots between different servers (hw)?
Since mysql data may also have tables with read-locked tables, how does it transfer between the servers? Manually I do it by flushing tables with read lock, but how it scales in the case as above in 1?

Thanks in advance.


----------



## gkontos (Mar 5, 2012)

It is very simple actually:

[CMD=""]host1> zfs send -R -i tank/db@yesterday tank/db@today | ssh root@host2 zfs receive -Fdv tank/db[/CMD]

Notice that sending snapshots is not a binary/ascii operation. You just send a READONLY part of your data, taken at some point of time in the past. 

You can not manipulate data contained in a snapshot. You would have to either clone them or send them first.

I am not sure if that operation would work between database servers. I have rolled back snapshots successfully in a development database server in the past though.

Regards,
George


----------



## SirDice (Mar 5, 2012)

zennybsd said:
			
		

> Â§2 Since mysql data may also have tables with read-locked tables, how does it transfer between the servers? Manually I do it by flushing tables with read lock, but how it scales in the case as above in Â§1?


Use the normal MySQL replication for this.


----------



## zennybsd (Mar 6, 2012)

Thanks gkontos and SirDice for your reply.


----------

