mysql dump from spring boot application

maxlastglance
PRO

10 months ago

I would like to backup my mysql database from my spring boot application to an S3 bucket. is there a way to install mysql on the machine, that I can run the mysqldump command on the railway instance? right now, I get the error, that the command is not found (which was of course kind of expected)

Awaiting User Response

6 Replies

10 months ago

Hello,

You can run mysqldump locally and upload the resulting file to S3, we don't currently have any working templates to achieve this automatically.


Status changed to Awaiting User Response Railway 10 months ago


10 months ago

Scratch that, looks like a template for it was published today - https://railway.app/template/BZJOmR


maxlastglance
PRO

10 months ago

thank you very much! I still have two further questions:

why is it possible to run the command from this node application but not from my java application?

what happens if this github code is updated. will it also just redeploy in my environment? if yes, that would be a very high security risk for me..


Status changed to Awaiting Railway Response Railway 10 months ago


10 months ago

  1. Don't really know what you mean, you haven't provided enough information.

  2. If you (the owner) push code to whatever branch you have connected to your Railway service the Railway service will deploy the new code, if anyone else pushes code you will need to manually approve the deployment within the dashboard for security reasons.


Status changed to Awaiting User Response Railway 10 months ago


maxlastglance
PRO

10 months ago

I want to do the backup in my own application. the problem is, that mysql is not installed on the instance my machine is running on. how can I install it? I think the template you provided installs it using a dockerfile. is there any other possibility to install dependencies on the instance?


Status changed to Awaiting Railway Response Railway 10 months ago


10 months ago

I'm not sure why you would want to install mysql dump alongside your Java app, but if you do, you would want to write your own Dockerfile as well.


Status changed to Awaiting User Response Railway 10 months ago