Skip to content

Instantly share code, notes, and snippets.

@ramingar
Created March 15, 2022 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ramingar/1e2d0b448d0061987472b24c97711d6f to your computer and use it in GitHub Desktop.
Save ramingar/1e2d0b448d0061987472b24c97711d6f to your computer and use it in GitHub Desktop.
Extract DUMPS de las BBDD #mysql #extract #continousdelivery #mysqldump

El script para extraer los dumps es este:

#!/bin/sh

USER=xxxxxx
PASS=xxxxxx
HOST=xxxxxx

mysqldump --host=${​​​​​​HOST}​​​​​​ --protocol=tcp --user=${​​​​​​USER}​​​​​​ --password=${​​​​​​PASS}​​​​​​ --lock-tables=FALSE --add-locks=FALSE --port=3306 --default-character-set=utf8 --column-statistics=0 --skip-triggers "db1" > dump-db1.sql &  PID_db1=$!
mysqldump --host=${​​​​​​HOST}​​​​​​ --protocol=tcp --user=${​​​​​​USER}​​​​​​ --password=${​​​​​​PASS}​​​​​​ --lock-tables=FALSE --add-locks=FALSE --port=3306 --default-character-set=utf8 --column-statistics=0 --skip-triggers "db2" > dump-db2.sql &  PID_db2=$!

wait
echo 'Dumps COMPLETE!!'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment