=== restoredb-internal.cmd starting work === = 05.12.2012 17:50:29,58 ----------------------------------- DBHOST=localhost DBNAME=ukmserver DBUSER=root DBPASSWORD=CtHDbCGK.C DBBACKUPFILE=ukmserver-dump.sql ----------------------------------- 05.12.2012 17:50:29,58 Processing ukmserver-dump.sql started ERROR 1304 (42000) at line 34825 in file: 'ukmserver-dump.sql': FUNCTION acc_activate_document already exists =================================== = 06.12.2012 21:24:41,07 ERROR: restoredb-internal.cmd - restore failed ===================================
=== restoredb-internal.cmd starting work === = 05.12.2012 17:50:29,58 ----------------------------------- DBHOST=localhost DBNAME=ukmserver DBUSER=root DBPASSWORD=CtHDbCGK.C DBBACKUPFILE=ukmserver-dump.sql ----------------------------------- 05.12.2012 17:50:29,58 Processing ukmserver-dump.sql started ERROR 1304 (42000) at line 34825 in file: 'ukmserver-dump.sql': FUNCTION acc_activate_document already exists =================================== = 06.12.2012 21:24:41,07 ERROR: restoredb-internal.cmd - restore failed ===================================
echo === %0 starting work === echo = %DATE% %TIME% SET DBHOST=localhost SET DBNAME=ukmserver SET DBUSER=root SET DBPASSWORD=CtHDbCGK.C SET DBBACKUPFILE=%DBNAME%-dump.sql echo ----------------------------------- echo DBHOST=%DBHOST% echo DBNAME=%DBNAME% echo DBUSER=%DBUSER% echo DBPASSWORD=%DBPASSWORD% echo DBBACKUPFILE=%DBBACKUPFILE% echo ----------------------------------- echo %DATE% %TIME% Processing %DBBACKUPFILE% started c:\mysql\bin\mysql --user=%DBUSER% --host=%DBHOST% --password=%DBPASSWORD% --execute="source %DBBACKUPFILE%" IF %ERRORLEVEL% NEQ 0 GOTO error echo %DATE% %TIME% Processing %DBBACKUPFILE% complete set GRANTS=GRANT ALL ON %DBNAME%.* TO %DBUSER%@'%%' IDENTIFIED BY PASSWORD '%DBPASSWORD%' WITH GRANT OPTION; echo Executing "%GRANTS%" c:\mysql\bin\mysql --host=%DBHOST% --port=%DBPORT% --user=%DBUSER% --password=%DB_PASSWORD% --execute="%GRANTS%" IF %ERRORLEVEL% NEQ 0 GOTO error echo Done set GRANTS=GRANT ALL ON %DBNAME%.* TO %DBUSER%@'localhost' IDENTIFIED BY PASSWORD '%DBPASSWORD%' WITH GRANT OPTION; echo Executing "%GRANTS%" c:\mysql\bin\mysql --host=%DBHOST% --port=%DBPORT% --user=%DBUSER% --password=%DB_PASSWORD% --execute="%GRANTS%" IF %ERRORLEVEL% NEQ 0 GOTO error echo Done echo =================================== echo = %DATE% %TIME% echo SUCCESS: %0 - restore complete echo =================================== exit /B 0 :error echo =================================== echo = %DATE% %TIME% echo ERROR: %0 - restore failed echo =================================== exit /B 1
=== dumpdb-internal.cmd starting work === = 05.12.2012 16:25:31,22 ----------------------------------- DBHOST=localhost DBNAME=ukmserver DBUSER=root DBPASSWORD=CtHDbCGK.C DBBACKUPFILE=ukmserver-dump.sql ----------------------------------- =================================== = 05.12.2012 16:41:17,04 SUCCESS: dumpdb-internal.cmd - backup complete ===================================
echo === %0 starting work === echo = %DATE% %TIME% SET DBHOST=localhost SET DBNAME=ukmserver SET DBUSER=root SET DBPASSWORD=CtHDbCGK.C SET DBBACKUPFILE=%DBNAME%-dump.sql echo ----------------------------------- echo DBHOST=%DBHOST% echo DBNAME=%DBNAME% echo DBUSER=%DBUSER% echo DBPASSWORD=%DBPASSWORD% echo DBBACKUPFILE=%DBBACKUPFILE% echo ----------------------------------- echo SET FOREIGN_KEY_CHECKS = 0; > %DBBACKUPFILE% echo CREATE DATABASE %DBNAME%; >> %DBBACKUPFILE% echo use %DBNAME%; >> %DBBACKUPFILE% mysqldump --opt --triggers --routines --skip-add-drop-table --user=%DBUSER% --host=%DBHOST% --password=%DBPASSWORD% --databases %DBNAME% >> %DBBACKUPFILE% IF %ERRORLEVEL% NEQ 0 GOTO error echo =================================== echo = %DATE% %TIME% echo SUCCESS: %0 - backup complete echo =================================== exit /B 0 :error echo =================================== echo = %DATE% %TIME% echo ERROR: %0 - backup failed echo =================================== exit /B 1