[DiscordArchive] like importing a mysqldump?
[DiscordArchive] like importing a mysqldump?
Archived author: mynameismeat • Posted: 2023-08-25T21:35:24.043000+00:00
Original source
like importing a mysqldump?
Archived author: mynameismeat • Posted: 2023-08-25T21:36:07.681000+00:00
Original source
all the sql in `data/sql` is "create blah if exists" and there's actually a db table that maintains which DB migrations have been executed as well
Archived author: mynameismeat • Posted: 2023-08-25T21:36:16.393000+00:00
Original source
its relatively safe
Archived author: AlexanderESmith • Posted: 2023-08-25T21:49:24.205000+00:00
Original source
Nice
Archived author: RyanAF • Posted: 2023-08-25T22:52:34.379000+00:00
Original source
that's awesome, was wondering about that a bit
Archived author: volek • Posted: 2023-08-25T23:03:16.539000+00:00
Original source
I had a docker snafu with my db server and lost some game data, so created some scripts for backing things up more often:
Here is some links if helpful:
Backup Mysql > GCP
https://gist.github.com/ben-of-codecraft...37343cfb1b
Backup Filesystem > GCP
https://gist.github.com/ben-of-codecraft...8c4735a876
Crontabs
https://gist.github.com/ben-of-codecraft...98a1a3186f
I do hourly db backups during the day and weekly filesystem backups, I have yet to have a bill from GCP because I set 2 week lifecycle to delete files.
I also use a save-character script I run every 5m or so to reduce the loss of character data if the server crashes (I have a small server so it may not scale at larger servers)
Here is that script, I didn't gist it.
```sh
#!/usr/bin/expect
# Replace 'YOUR_CONTAINER_NAME_OR_ID' with the actual name or ID of the container you want to attach to.
set container_name_or_id "aazerothcore-ac-worldserver-1"
# Start the 'expect' script to interact with the container's running script.
spawn docker attach "$container_name_or_id"
# Wait for the expected prompt or any other specific output that indicates the script is ready for input.
expect "AC>"
# Send the '.saveall' command to the container's script.
send ".saveall\r"
# Wait for a moment (if needed) to ensure the command is processed.
# Send the 'Ctrl+P' key combination.
send "\x10"
# Send the 'Ctrl+Q' key combination.
send "\x11"
# Finish the interaction.
expect eof
```
Hope it is helpful for someone
[Embed: Backs up Azerothcore database to GCP]
Backs up Azerothcore database to GCP. GitHub Gist: instantly share code, notes, and snippets.
https://gist.github.com/ben-of-codecraft...37343cfb1b
[Embed: Backsup azerothcore file directory to GCP]
Backsup azerothcore file directory to GCP. GitHub Gist: instantly share code, notes, and snippets.
https://gist.github.com/ben-of-codecraft...8c4735a876
[Embed: crontab for backups for Azerothcore]
crontab for backups for Azerothcore . GitHub Gist: instantly share code, notes, and snippets.
https://gist.github.com/ben-of-codecraft...98a1a3186f
Archived author: AlexanderESmith • Posted: 2023-08-25T23:22:21.617000+00:00
Original source
Holy shit, I haven't seen anyone other than me use expect in 15 years
Archived author: mynameismeat • Posted: 2023-08-25T23:22:33.643000+00:00
Original source
expect is nice
Archived author: AlexanderESmith • Posted: 2023-08-25T23:22:40.813000+00:00
Original source
Expect is amazing
Archived author: AlexanderESmith • Posted: 2023-08-25T23:22:48.981000+00:00
Original source
I have no idea why more people don't use it