mysqldump with date and time in backup file name on windows

masterdany88

I am unix man, and I really don't like work on windows. I am asking You for help.

I am trying to make regular backups of mysql database in microsoft windows cmd. Here is my current script for that:

C:\xampp\mysql\mysqldump.exe -hlocalhost -uroot -ppass stp > V:\backup_3.2.2.6__%date:/=%.sql

I would like to file name have structure like that:

backup_3.2.2.6__2015-06-02_10:25:35.sql

where is:

name__currentDate_currentTime.sql

So I just need to add current time to file name.

Please help

masterdany88

Here is working solution:

C:\xampp\mysql\mysqldump.exe -hlocalhost -uroot -ppass stp > V:\backup_3.2.2.6__%date:/=%_%time:~0,2%-%time:~3,2%-%time:~6,2%.sql

Where "pass" is Your password for root user

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

mysqldump with date and time in backup file name on windows

From Dev

Date and Time in a name of manual backup SQLEXPRESS.

From Dev

Escape a mm/dd/YY backup date in a file name

From Dev

Windows XP Batch File Date to file name

From Dev

Ansible backup file name

From Java

How do I get current date/time on the Windows command line in a suitable format for usage in a file/folder name?

From Dev

Add date and time to a file name in c

From Dev

Perl adding date/time to a file name

From Dev

Perl adding date/time to a file name

From Dev

How to save the file name with current date and time?

From Dev

Name a file in Java to include date and time stamp

From Dev

Append the current date and time to the file name

From Dev

Use xlswriter to name a file as current date and time

From Dev

How to write date and time to a file name?

From Dev

Making a backup file + appending date time + moving file if the file exists. PYTHON

From Dev

Error occurs when restoring a backup file created with mysqldump in Java

From Dev

launch mysqldump command to a remote server and save the backup file of mysqldump in the same remote server , in a specific folder

From Dev

Writing to text file with specific date and time in the file name

From Dev

How to append date to backup file

From Dev

creating mysqldump to backup database

From Dev

Securing backup credentials for MySQLDump

From Dev

Backup with mysqldump & rsync

From Dev

real time backup if file changed?

From Dev

bat file to change date time of files in a folder with today date time reading the file name from a text list

From Dev

Select a directory by checking its name for date and time in Windows Batch

From Dev

How to Add Date and Time To File Name Using VBA in Excel

From Dev

Cannot create a file name including date and time in C++

From Dev

build.xml to set date and time as file name

From Dev

How do you put date and time in a file name?

Related Related

  1. 1

    mysqldump with date and time in backup file name on windows

  2. 2

    Date and Time in a name of manual backup SQLEXPRESS.

  3. 3

    Escape a mm/dd/YY backup date in a file name

  4. 4

    Windows XP Batch File Date to file name

  5. 5

    Ansible backup file name

  6. 6

    How do I get current date/time on the Windows command line in a suitable format for usage in a file/folder name?

  7. 7

    Add date and time to a file name in c

  8. 8

    Perl adding date/time to a file name

  9. 9

    Perl adding date/time to a file name

  10. 10

    How to save the file name with current date and time?

  11. 11

    Name a file in Java to include date and time stamp

  12. 12

    Append the current date and time to the file name

  13. 13

    Use xlswriter to name a file as current date and time

  14. 14

    How to write date and time to a file name?

  15. 15

    Making a backup file + appending date time + moving file if the file exists. PYTHON

  16. 16

    Error occurs when restoring a backup file created with mysqldump in Java

  17. 17

    launch mysqldump command to a remote server and save the backup file of mysqldump in the same remote server , in a specific folder

  18. 18

    Writing to text file with specific date and time in the file name

  19. 19

    How to append date to backup file

  20. 20

    creating mysqldump to backup database

  21. 21

    Securing backup credentials for MySQLDump

  22. 22

    Backup with mysqldump & rsync

  23. 23

    real time backup if file changed?

  24. 24

    bat file to change date time of files in a folder with today date time reading the file name from a text list

  25. 25

    Select a directory by checking its name for date and time in Windows Batch

  26. 26

    How to Add Date and Time To File Name Using VBA in Excel

  27. 27

    Cannot create a file name including date and time in C++

  28. 28

    build.xml to set date and time as file name

  29. 29

    How do you put date and time in a file name?

HotTag

Archive