-
- Novice
- Posts: 3
- Liked: never
- Joined: Feb 24, 2015 9:09 am
- Contact:
MySQL Backup Scripts
Good morning.
I have a problem with backup MySQL databases in my environment.
Data of my environment:
- VB&R 9.5 U3
- VM that have MySQL databases: Ubuntu
I try to do a backup with option "Hot backup — Database freezing".
My procedure stay in an oficial whitepaper -> https://www.veeam.com/wp-consistent-pro ... riadb.html
When i try to execute this procedure, veeam show me "pre-freeze script finished execution with exit code 1 ".
Could anybody help me?
Best regards.
Case Number: 02633193
I have a problem with backup MySQL databases in my environment.
Data of my environment:
- VB&R 9.5 U3
- VM that have MySQL databases: Ubuntu
I try to do a backup with option "Hot backup — Database freezing".
My procedure stay in an oficial whitepaper -> https://www.veeam.com/wp-consistent-pro ... riadb.html
When i try to execute this procedure, veeam show me "pre-freeze script finished execution with exit code 1 ".
Could anybody help me?
Best regards.
Case Number: 02633193
-
- Product Manager
- Posts: 14715
- Liked: 1702 times
- Joined: Feb 04, 2013 2:07 pm
- Full Name: Dmitry Popov
- Location: Prague
- Contact:
Re: MySQL Backup Scripts
Hi ituserneedhelp.
Kindly, keep working with our support team and let us know how it goes. Thank you.
Kindly, keep working with our support team and let us know how it goes. Thank you.
-
- Novice
- Posts: 3
- Liked: never
- Joined: Feb 24, 2015 9:09 am
- Contact:
Re: MySQL Backup Scripts
Backup task:
Guest processing:
- Enable application-aware processing.
- General: Applications: Disable application processing
- Scripts:
- Linux scripts: Pre and Post script. My scripts stay in the link that i posted above.
I configure pre and post scripts.
I think that the problem is with authentication, because i have seen in logs: "/tmp/7a5c29ba-b471-47e6-935f-113a76b179de_PreMySQLZabbix.sh: línea 14: [: -uroot: se esperaba un operador binario"
I try to execute this script in my VM and the problem is the same, it seems that the line --> use_credentials="-uroot -p" it´s wrong.
But when write: use_credentials="-uroot -pPasswordForRoot" and after write ::mysql $use_credentials, i login correctly in MySQL environment.
Thanks for all!
Guest processing:
- Enable application-aware processing.
- General: Applications: Disable application processing
- Scripts:
- Linux scripts: Pre and Post script. My scripts stay in the link that i posted above.
I configure pre and post scripts.
I think that the problem is with authentication, because i have seen in logs: "/tmp/7a5c29ba-b471-47e6-935f-113a76b179de_PreMySQLZabbix.sh: línea 14: [: -uroot: se esperaba un operador binario"
I try to execute this script in my VM and the problem is the same, it seems that the line --> use_credentials="-uroot -p" it´s wrong.
But when write: use_credentials="-uroot -pPasswordForRoot" and after write ::mysql $use_credentials, i login correctly in MySQL environment.
Code: Select all
[08.03.2018 16:54:14] <21> Info [ScriptInvoker] Script enabled
[08.03.2018 16:54:14] <21> Info [ScriptInvoker] Creating Linux invoker.
[08.03.2018 16:54:14] <21> Info [ScriptInvoker] Starting pre-freeze script execution
[08.03.2018 16:54:14] <21> Info [ScriptInvoker] Running Linux script (SSH) 'E:\ScriptsBackup\PreMySQLZabbix.sh'
[08.03.2018 16:54:14] <21> Info [Ssh] Creating new cached connection [host: '192.168.1.31', port: 22, user: 'root', elevation to root: 'no', autoSudo: no, auth type: 'Password', host name: srv-zabbix, IPs: [192.168.1.31].].
[08.03.2018 16:54:14] <21> Info Creating Granados SSH connection (unknown protocol)
[08.03.2018 16:54:14] <21> Info [Ssh] logon, host: '192.168.1.31', port: 22, user: 'root', elevation to root: 'no', autoSudo: no, auth type: 'Password', host name: srv-zabbix, IPs: [192.168.1.31].
[08.03.2018 16:54:16] <21> Warning [Ssh] Failed to connect to guest with DNS name srv-zabbix. Host desconocido
[08.03.2018 16:54:16] <21> Info [Ssh] Connected to 192.168.1.31 while other addresses () are unavailable.
[08.03.2018 16:54:17] <21> Info [Ssh] Server (192.168.1.31) version string: "SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1"
[08.03.2018 16:54:17] <21> Info [ScriptInvoker] SSH connection is established (192.168.1.31).
[08.03.2018 16:54:18] <21> Info [ScriptInvoker] Exception thrown during script execution (SSH).
[08.03.2018 16:54:18] <21> Info [Ssh] Connection 79816d5d-70ef-4605-b392-71ebcbc4bb6c - [host: '192.168.1.31', port: 22, user: 'root', elevation to root: 'no', autoSudo: no, auth type: 'Password', host name: srv-zabbix, IPs: [192.168.1.31].] is disposing.
[08.03.2018 16:54:18] <21> Error [ScriptInvoker] Failed to execute script in lin guest machine over SSH. Script path: E:\ScriptsBackup\PreMySQLZabbix.sh.
[08.03.2018 16:54:18] <21> Error /tmp/7a5c29ba-b471-47e6-935f-113a76b179de_PreMySQLZabbix.sh: línea 14: [b][: -uroot: se esperaba un operador binario
[08.03.2018 16:54:18] <21> Error ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)[/b]
[08.03.2018 16:54:18] <21> Error (System.Exception)
[08.03.2018 16:54:18] <21> Error en Veeam.Backup.SSH.CSshCommandResult.GetAnswer(Boolean trimAnswer, String failText)
[08.03.2018 16:54:18] <21> Error en Veeam.Backup.SSH.CSshScriptFile.Execute(TimeSpan timeout, Boolean getExitCode, String[] args)
[08.03.2018 16:54:18] <21> Error en Veeam.Backup.Core.CSshScriptInvoker.ExecScript(String localPath, TimeSpan timeout)
[08.03.2018 16:54:18] <21> Error [ScriptInvoker] Failed to execute script over SSH, failing over to VIX.
[08.03.2018 16:54:18] <21> Error /tmp/7a5c29ba-b471-47e6-935f-113a76b179de_PreMySQLZabbix.sh: línea 14: [: -uroot: se esperaba un operador binario
[08.03.2018 16:54:18] <21> Error ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
[08.03.2018 16:54:18] <21> Error (System.Exception)
-
- Novice
- Posts: 3
- Liked: never
- Joined: Feb 24, 2015 9:09 am
- Contact:
Re: MySQL Backup Scripts
I find a solution to backup up my Mysql databases with other scripts.
-
- Product Manager
- Posts: 5796
- Liked: 1215 times
- Joined: Jul 15, 2013 11:09 am
- Full Name: Niels Engelen
- Contact:
Re: MySQL Backup Scripts
Looking at the error you got there was something wrong with your login to login via mysql you need to do:
mysql -uroot -pPASSWORD
I don't know what the line is in the script but that should resolve it though.
mysql -uroot -pPASSWORD
I don't know what the line is in the script but that should resolve it though.
Personal blog: https://foonet.be
GitHub: https://github.com/nielsengelen
GitHub: https://github.com/nielsengelen
-
- Veeam Legend
- Posts: 351
- Liked: 36 times
- Joined: Oct 24, 2016 3:56 pm
- Full Name: Marco Sorrentino
- Location: Ancona - Italy
- Contact:
Re: MySQL Backup Scripts
Hello,
is it possible to combine the database dump and the database freeze methods in order to have an application consistent backup ready for direct VM restore and an application consistent dump file that we can use for a file copy purpose?
Thank you
Marco
is it possible to combine the database dump and the database freeze methods in order to have an application consistent backup ready for direct VM restore and an application consistent dump file that we can use for a file copy purpose?
Thank you
Marco
-
- Enthusiast
- Posts: 50
- Liked: 5 times
- Joined: Oct 16, 2019 5:04 am
- Contact:
Re: MySQL Backup Scripts
Hello ituserneedhelp,
I have the same script in the link you posted above and like you, I have not been able to successfully backup MySQL databases in my environment.
Please what other scripts did you use.
I would appreciate your help with the script and how to apply them.
Thanks.
I have the same script in the link you posted above and like you, I have not been able to successfully backup MySQL databases in my environment.
Please what other scripts did you use.
I would appreciate your help with the script and how to apply them.
Thanks.
-
- Veeam Software
- Posts: 2097
- Liked: 310 times
- Joined: Nov 17, 2015 2:38 am
- Full Name: Joe Marton
- Location: Chicago, IL
- Contact:
Re: MySQL Backup Scripts
Please note that the updated Veeam Agent for Linux in v10 will have AAIP for MySQL. Even if your MySQL databases are VMs, as long as they run on Linux you could leverage VAL after v10 ships to protect the databases in a consistent manner without having to use any scripts.
Joe
Joe
Who is online
Users browsing this forum: Amazon [Bot], Maxim.Arkhangelskiy and 47 guests