Created
April 19, 2019 18:26
-
-
Save igoralves1/6d680f61f6873d8fcbf3a5afbfbac8b5 to your computer and use it in GitHub Desktop.
Win CRON JOB - DATABASE BACKUP ROUTINE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO off | |
REM - DATABASE BACKUP ROUTINE | |
ECHO. | |
ECHO 1 - dbTest STARTING backup ... | |
mysqldump -u root -pMYPASSWD --routines --add-drop-database --databases dbNameInMySql> C:/Users/backup/dbNameDumped.sql | |
ECHO dbTest - BACKUP DONE... | |
ECHO. | |
rar a -ag+YYYY{_}MM{_}DD{_}HHMMSS{_}NN C:/Users/backup/ C:/Users/backup/FinalFolder/ | |
PAUSE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Another way of dump in AWS
mysql -u<USER> -p'<PASSWORD>' -h<HOST> -e "<ANY SQL COMMAND>" DBNAME >"PATHtoSAVE.sql"
Ex usage:
mysql -uILA -p'gdhy651432!^' -hsfdgsdf.us-east-2.rds.amazonaws.com -e " SELECT * from table1 where FIELD1 IN(select id from TABLE2 where title LIKE '%STRING1%' OR title LIKE '%STRING1%' OR title LIKE '%STRING1%' OR title LIKE '%STRING1%' OR title LIKE '%STRING1%' OR title LIKE '%STRING1%') " DBNAME >"/Users/igor.alves/Desktop/skypeDump.sql"