Subversion Repositories zfs_utils

Rev

Rev 2 | Rev 4 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

replication is a script which is designed to manage replicating two sets of
ZFS snapshots. There are tons of them out there, and this is pretty
simplistic, especially as compared to some of the more throurough ones like
repl, etc... However, the ones I found did more than I wanted. I wanted
something which did a replication. No snapshot creation, no pruning, and no
fancy configuration or file naming convention.

replicate can be called simply from the a cron job (periodic) by putting the
source and target as parameters, ie

perl replicate source target

either source or target may have a hostname prepended, separated by a colon.
So

perl replicate src:source target

I wrote replication to handle a specific problem. I wanted an 'Air Gap'
server for backup. When the server was turned on, it would contact its
upstream server, sync, then shut down. The key to unlock the encrypted file
server is stored external to the Air Gap server and, if not found, the
server shuts itself off immediately.

The script to do that is included (sync) showing how to call replication.

sync requires a configuration file, sync.yaml. There is a sample (with
comments) included (sync.sample.yaml).