uci-nextcloud/scripts/dbdump

9 lines
554 B
Plaintext
Raw Permalink Normal View History

#!/bin/bash
# docker exec --env-file .env -w /var/lib/mysql nextcloud-db /bin/bash -c 'env | grep MYSQL && ls -la && mysql -p${MYSQL_ROOT_PASSWORD}'
# docker exec -w /var/lib/mysql nextcloud-db /bin/bash -c 'env | grep MYSQL && ls -la'
# docker exec -w /var/lib/mysql -e args=$1 nextcloud-db /bin/bash -c 'mysql -p${MYSQL_ROOT_PASSWORD} $args'
docker exec -w /var/lib/mysql -e args=$1 nextcloud-db /bin/bash -c 'mysqldump -p${MYSQL_ROOT_PASSWORD} $args > nextcloud.sql'
docker exec -w /var/lib/mysql nextcloud-db /bin/bash -c 'ls -la | grep .sql'