2014-09-15 10:13 AM
We've got a cDOT SVM with 950+ CIFS shares and we've got a DR SVM that we're snapmirroring the data to. This has to be a pretty common situation. How can I copy the cifs share info from my prod SVM to my DR SVM? Under 7 mode, I'd just grab a file out of /etc and (with minor changes) move it to DR. It might be scriptable, but that's difficult because the formatting of "cifs share show" spreads the data over several lines to make it more human readable, thus making it very difficult to parse in a script. Is there a way to get XML output, or at least a single line per share? Is there an API (Powershell, python, etc) that works well for this?
Any help or pointers would be appreciated.
2014-09-15 11:49 AM
Powershell API is great. You can also use 'cifs share show -fields <field1,field2,...>' to get only the fields you are interested in, that may be easier to parse, if you prefer this.