Configurable automatic database backups.
This commit is contained in:
@@ -20,6 +20,7 @@ import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseBackup;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.datatables.BufferTable;
|
||||
import com.l2jmobius.gameserver.datatables.OfflineTradeTable;
|
||||
@@ -480,6 +481,12 @@ public class Shutdown extends Thread
|
||||
|
||||
LOGGER.info("All database data committed.");
|
||||
|
||||
// Backup database.
|
||||
if (Config.BACKUP_DATABASE)
|
||||
{
|
||||
DatabaseBackup.performBackup();
|
||||
}
|
||||
|
||||
System.runFinalization();
|
||||
System.gc();
|
||||
|
||||
|
Reference in New Issue
Block a user