mysqldump from managed remote database server
- This topic is empty.
-
AuthorPosts
-
Louis
GuestSlickStack supports remote database such as from DigitalOcean, what about dumping the database to local SlickStack server
Alice
GuestYes 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.Sophia
Guestok where are the dumped database stored?
Emma
GuestThe dumps are under
/var/www/backups/mysql/
directory as .sql files.Peter
GuestJust 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
Deborah
GuestIf 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 threadDiane
Guest💯👍🏻
-
AuthorPosts