calmsolemn 发表于 2022-11-4 08:24:12

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

#!/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

websun01 发表于 2022-11-4 09:56:46

楼主加油,我们都看好你哦。

南飘中 发表于 2022-11-5 07:15:16

感恩无私的分享与奉献 :)

xuwenqing 发表于 2022-11-6 18:05:18

无回帖,不论坛,这才是人道。

shlinpin 发表于 2022-11-9 21:15:03

楼主加油,我们都看好你哦。

fuyongfuyong 发表于 2022-11-10 22:12:21

淡定,淡定,淡定……

275498507 发表于 2022-11-11 17:18:57

淡定,淡定,淡定……

zz06011023 发表于 2022-11-12 02:45:28

感恩无私的分享与奉献 :)

cdong27 发表于 2022-11-12 13:07:42

我只是路过打酱油的。

mgy2011 发表于 2022-11-12 21:58:53

无回帖,不论坛,这才是人道。
页: [1] 2
查看完整版本: 魔兽mangos系统用户数据自动备份Linux脚本