Link to home
Create AccountLog in
Avatar of Rocking Buddy
Rocking BuddyFlag for India

asked on

Dynamic pick the date in msdos batch file

Hi,


Need to create a windows scheduler to take backup of db, the sql file should be created with datetime daily, how to do it in MSDOS


Import command
mysqldump --host=localhost --port=3306 --default-character-set=utf8 --user=root -p --protocol=tcp --routines --events --no-data "test_db" > d:\\daily_db_backup_22102023.sql


Next day when job run it should auto change the date and take backup

mysqldump --host=localhost --port=3306 --default-character-set=utf8 --user=root -p --protocol=tcp --routines --events --no-data "test_db" > d:\\daily_db_backup_23102023.sql

ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of Rocking Buddy

ASKER

Thanks it worked.