Add a new backup script
This commit adds a backup script to backup all instances regularly. Fixes #11.
This commit is contained in:
parent
65a42f61e9
commit
21bd4f22c3
7 changed files with 115 additions and 17 deletions
|
|
@ -41,7 +41,7 @@ function dockerized_mysql() {
|
|||
return $retval
|
||||
}
|
||||
|
||||
# 'dockerized_mysql' runs an sql command in the sql docker container interactively
|
||||
# 'dockerized_mysql_interactive' runs an sql command in the sql docker container interactively
|
||||
function dockerized_mysql_interactive() {
|
||||
pushd "$DEPLOY_SQL_DIR" > /dev/null
|
||||
docker exec -ti `docker-compose ps -q sql` mysql "$@"
|
||||
|
|
@ -50,6 +50,15 @@ function dockerized_mysql_interactive() {
|
|||
return $retval
|
||||
}
|
||||
|
||||
# 'dockerized_mysqldump' runs a mysqldump command
|
||||
function dockerized_mysqldump() {
|
||||
pushd "$DEPLOY_SQL_DIR" > /dev/null
|
||||
docker exec -i `docker-compose ps -q sql` mysqldump "$@"
|
||||
retval=$?
|
||||
popd > /dev/null
|
||||
return $retval
|
||||
}
|
||||
|
||||
###
|
||||
### Bookkeeping sql
|
||||
###
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue