In our test lab, we have several different XCP-ng (and earlier XenServer 7.6) servers, each of which is allocated a different day of month to export at 1am via a simple bash script, using
xe vm-export vm=$sUuid filename="$sFnameTarget"
There are a couple of servers that we're currently having to do manually because they have 4TB drives full of data (backed up by other means) and we can't include them in the export.
What I'd like to do is to exclude these drives from the exports, so I've been experimenting on a 'Home environment' first, with just a single host running XCP-ng 8.3 and 2 guests: The first guest runs the Xen Orchestra Appliance (Xen Orchestra, commit 93a11) and the other guest is a simple Ubuntu guest with a second drive (see attachment).
On the 2 drive VM, I've set the drive name to "[NOSNAP][NOBAK] Second drive", as I've seen elsewhere on this forum, but running the 'xe vm-export...' from a shell still tried to include it.
I thought perhaps this "exclude drive" feature is only available from Orchestra rather than the host itself running 'xe' commands, so I tried exporting it from Orchestra via the Web UI - unfortunately, that didn't work either; it still tried to export the second drive.
I appreciate that '[NOBAK]' probably relates to backups rather than exports, but I thought the '[NOSNAP]' stood a good chance of working as (I thought) exports used the snapshot method first.
So my question is: Is there an equivalent '[NOEXPORT]' or similar to exclude the 2nd drive from exports by amending the drive name, similar to '[NOSNAP]'?
And if not, is there either a CLI xe command or Orchestra REST API equivalent of me manually detaching the second drive prior to the export then re-attaching it again please? As I don't want to have to do this in the early hours every month!
I appreciate that I'd have to get the bash script to retrieve and remember the ID for the drive to detach / re-attach after the export, but that's not a problem once I know the 'xe' or API commands to achieve the detach / attach.
Obviously I'd prefer the simpler '[NOSNAP]' type approach if there is an equivalent for exports under XO / the API?
Thank you.