Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] like importing a mysqldump?

[DiscordArchive] like importing a mysqldump?

[DiscordArchive] like importing a mysqldump?

Pages (2): 1 2 Next
rektbyfaith
Administrator
0
08-25-2023, 09:35 PM
#1
Archived author: mynameismeat • Posted: 2023-08-25T21:35:24.043000+00:00
Original source

like importing a mysqldump?
rektbyfaith
08-25-2023, 09:35 PM #1

Archived author: mynameismeat • Posted: 2023-08-25T21:35:24.043000+00:00
Original source

like importing a mysqldump?

rektbyfaith
Administrator
0
08-25-2023, 09:36 PM
#2
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
rektbyfaith
08-25-2023, 09:36 PM #2

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

rektbyfaith
Administrator
0
08-25-2023, 09:36 PM
#3
Archived author: mynameismeat • Posted: 2023-08-25T21:36:16.393000+00:00
Original source

its relatively safe
rektbyfaith
08-25-2023, 09:36 PM #3

Archived author: mynameismeat • Posted: 2023-08-25T21:36:16.393000+00:00
Original source

its relatively safe

rektbyfaith
Administrator
0
08-25-2023, 09:49 PM
#4
Archived author: AlexanderESmith • Posted: 2023-08-25T21:49:24.205000+00:00
Original source

Nice
rektbyfaith
08-25-2023, 09:49 PM #4

Archived author: AlexanderESmith • Posted: 2023-08-25T21:49:24.205000+00:00
Original source

Nice

rektbyfaith
Administrator
0
08-25-2023, 10:52 PM
#5
Archived author: RyanAF • Posted: 2023-08-25T22:52:34.379000+00:00
Original source

that's awesome, was wondering about that a bit
rektbyfaith
08-25-2023, 10:52 PM #5

Archived author: RyanAF • Posted: 2023-08-25T22:52:34.379000+00:00
Original source

that's awesome, was wondering about that a bit

rektbyfaith
Administrator
0
08-25-2023, 11:03 PM
#6
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
rektbyfaith
08-25-2023, 11:03 PM #6

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

rektbyfaith
Administrator
0
08-25-2023, 11:22 PM
#7
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
rektbyfaith
08-25-2023, 11:22 PM #7

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

rektbyfaith
Administrator
0
08-25-2023, 11:22 PM
#8
Archived author: mynameismeat • Posted: 2023-08-25T23:22:33.643000+00:00
Original source

expect is nice
rektbyfaith
08-25-2023, 11:22 PM #8

Archived author: mynameismeat • Posted: 2023-08-25T23:22:33.643000+00:00
Original source

expect is nice

rektbyfaith
Administrator
0
08-25-2023, 11:22 PM
#9
Archived author: AlexanderESmith • Posted: 2023-08-25T23:22:40.813000+00:00
Original source

Expect is amazing
rektbyfaith
08-25-2023, 11:22 PM #9

Archived author: AlexanderESmith • Posted: 2023-08-25T23:22:40.813000+00:00
Original source

Expect is amazing

rektbyfaith
Administrator
0
08-25-2023, 11:22 PM
#10
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
rektbyfaith
08-25-2023, 11:22 PM #10

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

Pages (2): 1 2 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)