I managed to build a simple export / import function using the SDK.
We can get the individual tag group configs and serialize them into a file. For the import they can be deserialized and loaded back to the tag providers.
However I am aware that this is not supported and might cause problems with future versions.
Thank you, having an officially supported way to achieve this would be really helpful.
Here is the export code as an example:
(if anyone wants to build something similar, do not forget to add proper error handling)
from com.inductiveautomation.ignition.gateway import IgnitionGateway
from com.inductiveautomation.ignition.common.tags.config import TagGroupConfiguration
from java.io import ObjectOutputStream, FileOutputStream
EXPORT_PATH = "C://yourpath/"
EXPORT_FILENAME = "TagGroupExport.txt"
logger = system.util.getLogger("myLogger")
context = IgnitionGateway.get()
tagManager = context.getTagManager()
providerNames = tagManager.getTagProviderNames()
logger.info("Provider Names " + str(providerNames))
for name in providerNames:
provider = tagManager.getTagProvider(name)
tagGroupsConfig = provider.getTagGroupsAsync().get()
logger.info("Exported TagGroups: " + str(tagGroupsConfig))
f=FileOutputStream(EXPORT_PATH + name + EXPORT_FILENAME)
o = ObjectOutputStream(f)
o.writeObject(tagGroupsConfig)
logger.info("Tag Groups " + name + " Exported")