mysqldump from managed remote database server
- This topic is empty.
-
AuthorPosts
-
March 16, 2023 at 4:46 pm #4615LouisGuest
SlickStack supports remote database such as from DigitalOcean, what about dumping the database to local SlickStack server
March 16, 2023 at 4:49 pm #4616AliceGuestYes 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.March 16, 2023 at 4:50 pm #4617SophiaGuestok where are the dumped database stored?
March 16, 2023 at 4:51 pm #4618EmmaGuestThe dumps are under
/var/www/backups/mysql/
directory as .sql files.March 16, 2023 at 4:52 pm #4619PeterGuestJust 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
March 16, 2023 at 4:58 pm #4620DeborahGuestIf 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 threadMarch 22, 2023 at 3:16 pm #4659DianeGuest💯👍🏻
July 7, 2023 at 7:29 pm #6552FrankGuestdoes WP-CLI take care of this
August 4, 2023 at 11:31 am #7103JaniceGuestDocs page for this command:
-
AuthorPosts
- You must be logged in to reply to this topic.