:: MySQLBackup By Matt Moeller
:: RED OLIVE DESIGN INC.
SET backupdate=%DATE:~10,4%-%DATE:~7,2%-%DATE:~4,2%-%TIME:~0,2%-%TIME:~3,2%
:: MySQl DB user
set dbuser=dumpuser
:: MySQl DB users password
set dbpass=t5794
:: Switch to the MySQL data directory and collect the folder names
pushd "E:\mysqlbackup"
:: Loop through the folders and use the fnames for the sql filenames, collects all databases automatically this way
echo "hello"
echo "Pass each name to mysqldump.exe and output an individual .sql file for each"
FOR /D %%F IN (*) DO (
"C:\wamp\bin\mysql\mysql5.1.36\bin\mysqldump.exe" --user=%dbuser% --password=%dbpass% --databases %%F > "E:\mysqlbackup\backupfiles\%%F.%backupdate%.sql"
)
echo "All done, pretty slick eh"
このコードはmationのためにいくつかを持っている私は、どのように私はそれを修正することができのmysqldumpスクリプトこのスクリプトでは、バックアップされていない
-- MySQL dump 10.13 Distrib 5.1.36, for Win32 (ia32)
--
-- Host: localhost Database: backupfiles
-- ------------------------------------------------------
-- Server version 5.1.36-community-log
/*!40101 SET @[email protected]@CHARACTER_SET_CLIENT */;
/*!40101 SET @[email protected]@CHARACTER_SET_RESULTS */;
/*!40101 SET @[email protected]@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @[email protected]@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @[email protected]@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @[email protected]@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @[email protected]@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @[email protected]@SQL_NOTES, SQL_NOTES=0 */;
"for for mation"? –