Closed tschettervictor closed 2 weeks ago
I suppose this wouldn’t work too well with the replicate sets, and wouldn’t allow multiple hosts, sets and jobs in the same script.
I’m going to reopen this as it would actually be fairly handy to have
-r (RECURSE_CHILDREN set to 1) -f (ALLOW_RECONCILIATION set to 1)
this way it wouldn’t be necessary to edit the config file during testing.
Close it if you feel adding the var in the command like “RECURSE_CHILDREN=1 zfs-replicate” would be enough
The current script is 100% environment variable driven. The config file is sourced by the script if present - meaning the config file is just a collection of environment variables. I don't really use the config. I just test using environment variables.
I'm going to throw this out there as an option.
Would it be more practical to define the variables as flags rather than a separate config file? For example, for a remote replication you could do
zfs-replicate -t remote -m push -s 192.168.1.250
-m MODE -t TYPE -s REMOTE_SERVER -r RECURSIVE if flag is added -z REPLICATE_FROM_SCRATCH if flag is added -l LOGBASE (could be specified if needed, otherwise set by main script) etc...
Just a thought.