艾西服务器

 找回密码
 立即注册
查看: 119|回复: 0

魔兽mangos用户数据自动备份脚本

[复制链接]

88

主题

0

回帖

10

积分

版主

Rank: 7Rank: 7Rank: 7

积分
10
发表于 2024-6-8 15:49:38 | 显示全部楼层 |阅读模式
魔兽mangos用户数据自动备份脚本

#!/bin/bash

USER=<USERNAME>
PASS=<PASSWORD>
DBNAME=mangos
RNAME=realmd

clear
echo "BACKING UP ACCOUNTS PHASE 1...(REALMD DATABASE)"
mysqldump --user=${USER} --password=${PASS} --opt ${RNAME} account account_banned ip_banned realmcharacters realmlist > `date +%m-%d-%y`realmd_char.sql
echo "BACKING UP ACCOUNTS PHASE 2...(MANGOS DATABASE)"
mysqldump --user=${USER} --password=${PASS} --opt ${DBNAME} arena_team arena_team_member arena_team_stats auctionhouse character character_action character_aura character_gifts character_homebind character_instance character_inventory character_kill character_pet character_queststatus character_reputation character_social character_spell character_spell_cooldown character_ticket character_tutorial corpse group group_member guild guild_member guild_rank instance item_instance item_text mail > `date +%m-%d-%y`mangos_char.sql
echo "BACKUP COMPLETED!"


windows

@ECHO OFF
set datum=%date%
set datum1=%date: =-%
set datum2=%date1:.=-%

@echo off
for /F "tokens=1-4 delims=:., " %%a in ('time/T') do set Time=%%ah-%%bmin

SET DBUSER=DATABASE USERNAME
SET DBPASS=YOUR PASS OFFCOURSE
SET MDBNAME=mangos
SET RDBNAME=realmd
SET MYPATH="D:\apache2triad\mysql\bin\mysqldump.exe"
set backup=%date2%

ECHO EXPORTING ACCOUNTS BA​


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|小黑屋|艾西服务器 ( 赣ICP备2023005995号 )

GMT+8, 2024-7-14 10:23 , Processed in 0.047913 second(s), 18 queries , Gzip On.

Powered by 艾西服务器论坛

© 2021-2023 联系艾西.

快速回复 返回顶部 返回列表