1

I have some datasets that are frequently written to, but whose data is non critical (caches etc.). Is it possible to "send" these to another pool without copying any of their data?

I realised too late of course that I should have just done this when I created them (and they were empty), but given that I have not, and may wish to perform some kind of automation, is there a way to copy (or rather, re-create) a dataset on a target pool using only its properties?

I'm specifically using OpenZFS (v2.1) in case there is a simpler answer for that, though a general purpose answer for any version of ZFS would be good as well, if there is one.

Haravikk
  • 267
  • 4
  • 12

1 Answers1

2

I am not aware of such a tool. However, you can use

zfs get -H all tank/filesystem

to get all filesystem properties in a tab delimited format. Then you can parse the output and then run zfs set with the processed data.

Another option is to use -o <option> to collect values for important properties and then set those on the other system.

Tero Kilkanen
  • 34,499
  • 3
  • 38
  • 58