allanjude / zxfer

A continuation of development on zxfer, a popular script for managing ZFS snapshot replication
BSD 2-Clause "Simplified" License
124 stars 40 forks source link

readonly=on and mountpoint #2

Closed antxxxx closed 9 years ago

antxxxx commented 10 years ago

One of the things I would like to do with this is copy a filesystem to a new host and mount it readonly on the new host. If you do this you can still receive new incremental backups on the new host, and you can also browse the file system on the new host

I have tried passing

-o readonly=on,mountpoint=/usr/local/backup/usr/home

to zxfer but noticed that mountpoint is stripped out of the zfs create command that is run because it is one of the readonly_properties

Is it possible to either add a new option to specify a mountpoint (which if passed sets readonly=on as well) or allows these 2 options to be passed together

allanjude commented 10 years ago

Fixed in 69c8c9d09f30d503e7e48968707c560e8fed769b The function that removes any 'readonly' properties from the list of properties to set, will now skip over any explicitly set with -o