bolthole / zrep

ZREP ZFS based replication and failover script from bolthole.com
Other
248 stars 57 forks source link

ZREP_INC_FLAG="-I" not used with custom zrep tag #201

Open ma-ef opened 1 year ago

ma-ef commented 1 year ago

When pulling a backup with a custom zrep tag, the default is to use zfs send -i. In my case I wanted to use the -I flag instead to also send intermediate snapshots. According to the zrep documentation and script, this should be possible by using ZREP_INC_FLAG="-I" However, this flag is not passed on to the relevant subroutine _refreshpull which is called on the remote host.

ma-ef commented 1 year ago

Just realized that there is already a pull request for this issue

ppbrown commented 1 year ago

Would you please try out

https://github.com/bolthole/zrep/raw/issue201/zrep

Disclaimer: i havent tested it. But basically, I added two new global flags, --allincrementals --notallincrementals

I also tweaked the internals though, so some things might not work properly any more. (ideally they will be fine, but just FYI)

ma-ef commented 4 months ago

Unfortunately it does not work. When passing --allincrementals you get this error message: ERROR: unrecognized zrep subcommand --allincrementals I guess the error is in this line while [[ "$1" == "--" ]] ; do what you probably want to test here, whether the arguments starts with "--" but you test whether it is "--"

I saw that for backward compatibility you kept the ZREP_INC_FLAG="-I". The strange thing is that it also does not work when passing ZREP_INC_FLAG="-I" as well. I suspect it is not passed on to the sending zrep. Please have a look at the other bug report where you mentioned ZREP_SEND_FLAGS which probably should be set.