• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Linux Database backups during globalsave

Diazapam

!ROFLMAO!
Joined
Jul 29, 2009
Messages
1,411
Reaction score
9
Location
$_GET['Country']
I've come with the idea to make a database backup during the globalsave (daily).
Just like RL tibia (probably) handles it.

Anyone got me tips on how to do it?

Using the globalsave option in TFS it should shutdown on its own but than...
First of all Linux has to copy the whole database to a file or another database (Which can be written to file later that day cause it isn't in use).
After that it should resume the screen that was already opened and execute ./theforgottenserver to start the server again.

And it shouldn't be on the root since I don't like using root running screens.
 
Hmm, if the forgottenserver process shuts down then use this:

Code:
while true; do (./theforgottenserver; mysqldump -u username -pPassword database > mysql-backup-$(date +"%d-%m-%Y").sql); done
(Auto restarter, will take backup each time theforgottenserver shutsdown.
 
Back
Top