I’m not sure if what I’m asking is possible but is there a way I can use two tenants in a single runbook with a to and from?
Basically the scenario is we would like to take a database backup from tenant 1 and restore it to tenant 2.
Both tenants have their own defined variables on where the database server is and what the database name is.
Any help would be greatly appreciated.
Thank you,
Dave Schmitz
Thank you for reaching out. In a nutshell, yes that is possible, but you have to do some magic to get it to work.
You’ll need three runbooks.
Create backup (and scrub it?) for Tenant A
Restore backup of Tenant A to Tenant B
Orchestration runbook leveraging the run a runbook step template.
The run a runbook step allows you to pass in a tenant name. I did that for our spin-up process to create multiple EC2 workers in AWS across regions (each tenant is a region because AWS has different AMIs, VPCs, etc per region).
My thinking is the runbook that creates the database backup does so to a secure location but with a common naming convention. \mysecureshare\databasebackups[tenant name].bak
Then the restore runbook uses that same naming convention (and accepts the tenant from as a prompted variable) to restore it.
I like the idea of the 3 runbook idea. The part I’m a bit confused on is Tenant A and Tenant B both have variables such as database server, database name, etc. How would orchestrator runbook know to pass Tenant A to runbook 1 and Tenant B to runbook 2.
If I were setting this up, I’d probably configure the orchestrator project to run under the tenant from tenant. When calling the backup runbook, send the name of the tenant being run as.