0

We have two servers namely serverA and serverB. I need to take mysql database backup of serverA staying at serverB. The tool I need to use is "AutoMySQLBackup".

I got the link for downloading it:

https://sourceforge.net/projects/automysqlbackup/

Extracted the tar and changed the config file in /etc/automysqlbackup/automysqlbackup.conf as per my need.

As I run automysqlbackup, I get the backups on daily basis though there are warnings:

###### WARNING ######
Errors reported during AutoMySQLBackup execution.. Backup failed
Error log below..
mysql: [Warning] Using a password on the command line interface can be insecure.
mysqldump: [Warning] Using a password on the command line interface can be insecure.
mysqlshow: [Warning] Using a password on the command line interface can be insecure.
mysqldump: [Warning] Using a password on the command line interface can be insecure.
mysqldump: [Warning] Using a password on the command line interface can be insecure.
mysqldump: [Warning] Using a password on the command line interface can be insecure.
mysqldump: [Warning] Using a password on the command line interface can be insecure.
mysqldump: Got error: 1142: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'accounts' when using LOCK TABLES
mysqldump: [Warning] Using a password on the command line interface can be insecure.

But, I need to take the backup of remote server and don't find the way to do that using this tool. I tried using :

ssh serverA@ip-address | automysqlbackup 

but nothing is happening.

Note: I can't reply to answers so i am mentioning it here. I need to get the backup directly from serverA to serverB with the help of automysqlbackup like the way mysqldump or someother tool does.

mysqldump --host 192.168.1.15 -P 3306 -u dev -pmjQ9Y mydb > mydb.sql

Is there way to pipe automysqldump with ssh? No scp,rsync. I have access to certain database in serverA while accessing from serverB.

If anyone of you have used this tool, then please help me.

0

1: Are you able to do the backup? as i see an error on that message i got confused about it.

2: Did you set up a CRON to run the script daily? First thing that come to mind was to run a ssh copy of the backup to server B in the CRONjob (using SCP command)

8
  • hi luisbessa, yes i can get the backup of all the databases on /var/backup/db/daily directory. I haven't set cron for the script. All i did was running automysqlbackup and it takes the backup. But as i said, i would want the backup of remote server in my local machine. How can i use scp with cron for that ? – rackwadi Jun 27 '18 at 4:47
  • Take it from here how to SCP: stackoverflow.com/questions/11304895/… If you want, put it in a cron job and you will make a copy every day/week/month as you wish – luisbessa Jun 27 '18 at 9:08
  • is there way to use automysqlbackup along with ssh without scp or rsync? – rackwadi Jun 27 '18 at 12:06
  • along with ssh i believe not by default, if you setup automysqlbackup on ServerB with a host as ServerA it will allow you but you need to give access to user from other IP (ServerB) – luisbessa Jun 27 '18 at 14:05
  • where should i give the access? could you provide any idea regarding the commands? – rackwadi Jun 28 '18 at 4:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.