You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the sync command to retrieve a database from a Lagoon environment, I'd like to be able to specify the destination filename so I can reference it specifically on my server.
I'm currently working on an integration between Lullabot's Tugboat QA system and Lagoon, and the flexibility to specify the target name would allow me to use the Tugboat config file to do the import needing to use a wildcard to search for a filename. I imagine this could also be useful if you are extracting databases from multiple environments.
But then assumes that the source and target services use the same credentials. Tugboat has predefined credentials that do not match, so the sync fails on import. It's simpler and more flexible for us to get that dumpfile, run our own import, and do the cleanup ourselves.
The text was updated successfully, but these errors were encountered:
Motivation
When using the
sync
command to retrieve a database from a Lagoon environment, I'd like to be able to specify the destination filename so I can reference it specifically on my server.I'm currently working on an integration between Lullabot's Tugboat QA system and Lagoon, and the flexibility to specify the target name would allow me to use the Tugboat config file to do the import needing to use a wildcard to search for a filename. I imagine this could also be useful if you are extracting databases from multiple environments.
Current Behavior
Running the following command:
lagoon-sync sync mariadb -e "${LAGOON_PROD_ENV}" --skip-target-cleanup=true --skip-target-import=true
results in a file like this:
/tmp/lagoon_sync_mariadb_1691429815236837058.sql.gz
This doesn't specify the environment and the timestamp doesn't allow me to target this file specifically in order to script an import on my service.
Desired Behavior
I'd like to use a flag like this:
lagoon-sync sync mariadb -e "${LAGOON_PROD_ENV}" --target-file="lagoon-${LAGOON_PROD_ENV}--latest.sql.gz" --skip-target-cleanup=true --skip-target-import=true
Why not use Lagoon sync to import the db?
The
.lagoon.yml
file allows me to override the database config as so:But then assumes that the source and target services use the same credentials. Tugboat has predefined credentials that do not match, so the sync fails on import. It's simpler and more flexible for us to get that dumpfile, run our own import, and do the cleanup ourselves.
The text was updated successfully, but these errors were encountered: