mysqldump from managed remote database server
- This topic is empty.
-
AuthorPosts
-
LouisGuest
SlickStack supports remote database such as from DigitalOcean, what about dumping the database to local SlickStack server
AliceGuestYes it’s supported recently. Before it didn’t work because SlickStack only installed
mysql-server
package and skipped when remote database was detected in ss-config:SS_DATABASE_REMOTE="true"
But now it’s fixed.
https://github.com/littlebizzy/slickstack/blob/master/bash/ss-dump-database.txt
Just run
ss dump database
and you will see it.SophiaGuestok where are the dumped database stored?
EmmaGuestThe dumps are under
/var/www/backups/mysql/
directory as .sql files.PeterGuestJust to clarify, SlickStack now installs
mysql-client
on your machine if you have enabled remote database in your ss-config.Otherwise, it will install
mysql-server
and setup a database locally.See here:
https://github.com/littlebizzy/slickstack/blob/master/bash/ss-install-mysql-packages.txt
DeborahGuestIf anyone is wondering how SlickStack ensures this works for remote database hosts with strange names full of special characters, it’s because of this function:
function ss_mysqldump_user { command mysqldump --user="${DB_USER}" --password="${DB_PASSWORD}" --host="${DB_HOST}" --protocol=tcp --port="${DB_PORT}" --no-create-db --no-tablespaces --single-transaction --dump-date --force "$@" }
Calling these as variables avoids conflicts with
mysqldump
see this threadDianeGuest💯👍🏻
FrankGuestdoes WP-CLI take care of this
JaniceGuestDocs page for this command:
-
AuthorPosts