Subversion Repositories zfs_utils

Rev

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

Rev Author Line No. Line
2 rodolico 1
replication is a script which is designed to manage replicating two sets of
2
ZFS snapshots. There are tons of them out there, and this is pretty
3
simplistic, especially as compared to some of the more throurough ones like
3 rodolico 4
repl, etc... However, the ones I found did more than I wanted. I wanted
5
something which did a replication. No snapshot creation, no pruning, and no
6
fancy configuration or file naming convention.
2 rodolico 7
 
3 rodolico 8
replicate can be called simply from the a cron job (periodic) by putting the
9
source and target as parameters, ie
10
 
11
perl replicate source target
12
 
13
either source or target may have a hostname prepended, separated by a colon.
14
So
15
 
16
perl replicate src:source target
17
 
2 rodolico 18
I wrote replication to handle a specific problem. I wanted an 'Air Gap'
19
server for backup. When the server was turned on, it would contact its
20
upstream server, sync, then shut down. The key to unlock the encrypted file
21
server is stored external to the Air Gap server and, if not found, the
22
server shuts itself off immediately.
23
 
24
The script to do that is included (sync) showing how to call replication.
25
 
26
sync requires a configuration file, sync.yaml. There is a sample (with
27
comments) included (sync.sample.yaml).