diff --git a/Server Files/Tools/Backup_DB_sample.bat b/Server Files/Tools/Backup_DB_sample.bat index a25ff2252..fa5f75e91 100644 --- a/Server Files/Tools/Backup_DB_sample.bat +++ b/Server Files/Tools/Backup_DB_sample.bat @@ -5,6 +5,7 @@ SET mysqlschema=[Your DB schema name] SET mysqlpassword=[your DB password] SET mysqluser=[your DB user login] SET housekeepafter=5 +<<<<<<< HEAD For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b) For /f "tokens=1-2 delims=/:" %%a in ("%TIME%") do (set mytime=%%a.%%b) @@ -13,6 +14,9 @@ set hour=%time:~0,2% if "%time:~0,1%"==" " set hour=0%time:~1,1% set datestamp=%date:~10,4%-%date:~4,2%-%date:~7,2%_%hour%%time:~3,2% +======= +SET datestamp=%date:~-10,2%-%date:~-7,2%-%date:~-4,4%_%time:~0,2%.%time:~3,2%.%time:~6,2% +>>>>>>> 4496e16... Added a basic DB backup batch file @REM *** EXECUTION *** @REM Change to mysqldir c: diff --git a/Server Files/Tools/Backup_DB_sample.txt b/Server Files/Tools/Backup_DB_sample.txt index 2aeaec576..fa4363148 100644 --- a/Server Files/Tools/Backup_DB_sample.txt +++ b/Server Files/Tools/Backup_DB_sample.txt @@ -1,7 +1,10 @@ RimBlocks basic MySQL DB backup. +<<<<<<< HEAD This batch (.bat) file will connect to your MySQL server and create a dump of the sql code required to recreate the DB you have selected. mysqldump.exe has other options you can supply so you could talior the basic script fairly easily to fit your individual need. +======= +>>>>>>> 4496e16... Added a basic DB backup batch file How to use Backup_DB.bat Input your DB connection details and desired backup save location. All details that need changing are in []. Make the changes without the []. @@ -19,4 +22,8 @@ Housekeeping will clear any .sql files that are over housekeepafter number of da You may need to confirm the MySQL path for the mysqldump exe as it may depend on your provider. -Add "pause" (without "") at the end of the file to require an input for debugging. This allows you to check the test backup is ok and troubleshoot any issues. Remove it when automating or the .bat file will never close. Automation can be done via Windows task scheduler. Create a basic task and then edit the tasks parameters after creating if you want to backup more than once a day. The option is only available after the task is created. \ No newline at end of file +<<<<<<< HEAD +Add "pause" (without "") at the end of the file to require an input for debugging. This allows you to check the test backup is ok and troubleshoot any issues. Remove it when automating or the .bat file will never close. Automation can be done via Windows task scheduler. Create a basic task and then edit the tasks parameters after creating if you want to backup more than once a day. The option is only available after the task is created. +======= +Add "read" (without "") at the end of the file to require an input for debugging. This allows you to check the test backup is ok and troubleshoot any issues. Remove it when automating or the .bat file will never close. Automation can be done via Windows task scheduler. Create a basic task and then edit the tasks parameters after creating if you want to backup more than once a day. The option is only available after the task is created. +>>>>>>> 4496e16... Added a basic DB backup batch file