Boxman80

Manual Backups

7 posts in this topic

Does anyone know how to perform a manual backup using HeidiSQL?  Is it just the "export database as SQL"?

 

Thanks in advance for helping a newbie! 

Edited by Boxman80

Share this post


Link to post
Share on other sites

yup that's the one @Boxman80 , just remember to select the data being exported, do the drop/create table but unless the SQL install is on your own machine don't select create/drop database, then select zip

 

heidi.png

Edited by red_ned
1 person likes this

Share this post


Link to post
Share on other sites
Advertisement

Sorry to be a pain but does anyone know or can anyone help me in creating a batch file to automatically connect and create a batch file  - or is it easier to schedule this via HeidiSQL?

Share this post


Link to post
Share on other sites

Run this with windows scheduler.

SET BackupDir="C:\path\to\backup\folder\"
SET mysqldir="C:\wamp\bin\mysql\mysql5.6.17\bin\"
SET mysqlschema=yourdatabasename
SET mysqluser=yourdatabaseuser
SET mysqlpassword=userpassword

for /F "usebackq tokens=1,2 delims==" %%i in (`wmic os get LocalDateTime /VALUE 2^>NUL`) do if '.%%i.'=='.LocalDateTime.' SET ldt=%%j
set datestamp=%ldt:~0,4%-%ldt:~4,2%-%ldt:~6,2%.%ldt:~8,2%-%ldt:~10,2%-%ldt:~12,2%
c:
cd %mysqldir%
mysqldump -u %mysqluser% -p%mysqlpassword% --databases %mysqlschema% --routines --events --triggers --quick >%BackupDir%\%mysqlschema%_backup.%datestamp%.sql

 

3 people like this

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.