Hello,
i'm using this script to backup:
---
rem path to mysql server bin folder
cd "D:\xampp\mysql\bin"
rem credentials to connect to mysql server
set mysql_user=admin
set mysql_password=root
rem backup file name generation
set backup_path=C:\Users\kane\Desktop
set backup_name=home-backup
rem backup creation
mysqldump --user=%mysql_user% --password=%mysql_password% --all-databases --routines --events --result-file="%backup_path%\%backup_name%.sql"
if %ERRORLEVEL% neq 0 (
(echo Backup failed: error during dump creation) >> "%backup_path%\mysql_backup_log.txt"
) else (echo Backup successful) >> "%backup_path%\mysql_backup_log.txt"
-------
but when i restore this backup, the database is corrupted, when i backup manually from phpmyadmin and restore everything is fine?.
what's wrong with this script? or any one has a better format?
thanks.
i'm using this script to backup:
---
rem path to mysql server bin folder
cd "D:\xampp\mysql\bin"
rem credentials to connect to mysql server
set mysql_user=admin
set mysql_password=root
rem backup file name generation
set backup_path=C:\Users\kane\Desktop
set backup_name=home-backup
rem backup creation
mysqldump --user=%mysql_user% --password=%mysql_password% --all-databases --routines --events --result-file="%backup_path%\%backup_name%.sql"
if %ERRORLEVEL% neq 0 (
(echo Backup failed: error during dump creation) >> "%backup_path%\mysql_backup_log.txt"
) else (echo Backup successful) >> "%backup_path%\mysql_backup_log.txt"
-------
but when i restore this backup, the database is corrupted, when i backup manually from phpmyadmin and restore everything is fine?.
what's wrong with this script? or any one has a better format?
thanks.