R
Railwayβ€’9mo ago
Yashu

How can I Duplicate the volume data

I was trying to sync the environment variable to Doppler service. While it didn't imported all the environment variables to Doppler, and instead it messed up some variables in railway. Luckly, it was just a database Docker image, and the data is still safe. it was the production database πŸ™ˆ How can I duplicate the volume data, so that I can create a new service and attach the duplicated volume to the new service.
Solution:
so use mysqldump
Jump to solution
13 Replies
Percy
Percyβ€’9mo ago
Project ID: 8fc2ad89-714b-4cb3-9778-cb64d1373409
Yashu
YashuOPβ€’9mo ago
8fc2ad89-714b-4cb3-9778-cb64d1373409
Brody
Brodyβ€’9mo ago
I'm a bit lost, what service was this volume attached to?
Yashu
YashuOPβ€’9mo ago
Sorry for not being clear in the post description It was mysql db (docker image) https://hub.docker.com/_/mysql
Brody
Brodyβ€’9mo ago
do you know the username and password that was used for it?
Yashu
YashuOPβ€’9mo ago
username/password of the database?
Brody
Brodyβ€’9mo ago
yes
Yashu
YashuOPβ€’9mo ago
yes, I know the credentials
Brody
Brodyβ€’9mo ago
is the volume currently mounted to a service?
Yashu
YashuOPβ€’9mo ago
yes, it's currently attached/mounted to the mysql docker service (with messsed up env)
Solution
Brody
Brodyβ€’9mo ago
so use mysqldump
Yashu
YashuOPβ€’9mo ago
ah! gotcha
Brody
Brodyβ€’9mo ago
then the mysql cli would be used to restore to the new database
Want results from more Discord servers?
Add your server