static void Init()
 {
     try {
         SaveTask.OnSaveStarted += Cache_OnSaveStarted;
         SaveTask.OnSaveEnded   += Cache_OnSaveEnded;
         SaveTask.Initialize(WorldConfiguration.Instance.SaveInterval);
         DatabaseBackupProvider.Initialize(Environment.CurrentDirectory + "\\Backups\\");
         InitializeSave();
     }
     catch (Exception ex) {
         logger.Error(ex);
     }
 }
        static void Cache_OnSaveEnded(int elapsed)
        {
            if (WorldConfiguration.Instance.PerformBackup)
            {
                DatabaseBackupProvider.Backup();
            }

            logger.Color2("Server Saved (" + elapsed + ")s");
            if (!WorldServer.Instance.IsStatus(ServerStatusEnum.SAVING))
            {
                return;
            }

            WorldServer.Instance.SetServerStatus(ServerStatusEnum.ONLINE);
            WorldServer.Instance.OnClients(x => x.Character.TextInformation(TextInformationTypeEnum.TEXT_INFORMATION_ERROR, 165));
        }
 public static void BackupCommand(string input)
 {
     DatabaseBackupProvider.Backup();
 }