We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We have #207 , but this is not suited for Acquia Cloud Next. We need different documentation for pulling database dumps on the command-line for ACN.
The text was updated successfully, but these errors were encountered:
Here is an example shell script for doing this:
#!/bin/bash set -euo pipefail # Gets the latest database backup. # This requires: # - curl and jq be installed on the Tugboat service. # - two custom environment variables: # 1. ACQUIA_CLOUD_API_KEY # 2. ACQUIA_CLOUD_API_SECRET # Also, specify your environment id, e.g. example.prod environment_id=[your-environment-id] # And specify your database name, e.g. example database_name=[your-database-name] # Install Acquia CLI. curl --remote-name --location https://github.com/acquia/cli/releases/latest/download/acli.phar chmod +x acli.phar mv acli.phar /usr/local/bin/acli # Login. acli auth:login --no-interaction --key "$ACQUIA_CLOUD_API_KEY" --secret "$ACQUIA_CLOUD_API_SECRET" # Get last backup id. backup_id=$(acli --no-interaction api:environments:database-backup-list "$environment_id" "$database_name" | jq '.[0].id') # Get DB backup URL. backup_url=$(acli --no-interaction api:environments:database-backup-download "$environment_id" "$database_name" "$backup_id" | jq --raw-output '.url') # Debug info. echo "🤖 backup_id > $backup_id" echo "🤖 backup_url > $backup_url" # Download DB backup. curl -o db-dump.sql.gz "$backup_url"
Sorry, something went wrong.
Thank you for this. I also moved environment ID and database name to ENV so this is more cut-and-pasteable :)
No branches or pull requests
We have #207 , but this is not suited for Acquia Cloud Next. We need different documentation for pulling database dumps on the command-line for ACN.
The text was updated successfully, but these errors were encountered: