Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to backup the server database when using container. #12

Open
codec-abc opened this issue Jul 27, 2018 · 5 comments
Open

How to backup the server database when using container. #12

codec-abc opened this issue Jul 27, 2018 · 5 comments

Comments

@codec-abc
Copy link

Hi,

Assuming that I followed the docker compose and got a server running properly, how can I backup and restore the database to a fresh new container?

@JavaProgrammerLB
Copy link

hi, @codec-abc ,do you get the way to backup the server database, I have the same question

@codec-abc
Copy link
Author

No, but it was not such a big deal in the end. Because once you got a speed/teleport hack you can go everywhere pretty quickly and since most quests can be done without stuff you don't lose that much time by starting from scratch.

@TheGreyDiamond
Copy link

So there is no way to save the progress when using docker?

@timothyleung1
Copy link

Probably its because the docker design changed. When you type control+c after docker-compose up
It should technically send a SIGINT signal to the script in script/masterserver.sh and it will then store your current status using a dump, and then reload it later on when you run docker-compose up. I couldn't manage to fix the script, but you can technically run docker ps to find the masterserver id , then execute docker exec -it <id> /bin/sh and kill the process yourself to generate the .sql file which stores your game, you can run kill 1 to do that. You should then able to see a message in the other window, the window that you ran docker-compose up, saying a .sql is generated.

@NerusSkyhigh
Copy link

I know this is an old issue but it might help someone else:
For me, it was sufficient to comment drops in "./server/MasterServer/initdb.sql" and stop the container with "docker-compose down" from another shell. This sends the right signal to the "masterserver.sh" script and allows it to back up the data. Note: if you created the folder "postgres-data" by hand you need to give the docker user the right permissions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants