Trying to script a full org config export for DR purposes using the CX as Code CLI, but it’s failing hard on resource dependencies. I’m running genesys-cloud export --resources all --output ./backup from my local machine, targeting our prod tenant. The process gets about 30% through, dumping a bunch of routing queues and user groups, then it hits a wall.
The error log shows a 409 Conflict when trying to export integrations:api:integration resources. Specifically, it seems to be choking on the OAuth client configurations linked to our custom web app. The CLI output says:
Error exporting resource integrations:api:integration:12345
Conflict: Resource is locked by another process or dependency not met.
I’ve checked the UI, and no one is editing those integrations. I even tried running this during our maintenance window at 2 AM CST to avoid any human interference. The issue persists.
Looking at the raw JSON payload the CLI is sending to the /api/v2/integrations/api/integrations endpoint, it seems like it’s trying to resolve a circular dependency between the integration and the associated oauth:client resource. The export order in the CLI doesn’t seem to account for this. I tried manually exporting the OAuth clients first using --resources oauth:client, but when I run the full export again, it still fails on the integrations.
Is there a way to force the export order or ignore specific locked resources? I don’t want to skip them entirely because I need the full config for DR. I’ve read the docs on genesys-cloud export, but there’s no flag for dependency resolution.
Also, I noticed the CLI doesn’t provide a retry mechanism for 409s. It just crashes. I’ve been manually deleting and recreating the export script, which is tedious.
Any ideas on how to bypass this lock? Or is this a known bug in the latest version of the CX as Code tooling?