First of all, I'd like to thank wipe_out for this cleaver and intelligent script.
Backing up local DBs works like a charm.
But when I try to backup remote servers (DBHOST = xxx.xxx.xxx.xxx or DBHOST=mydomain.com), the script runs and creates the directory structure, but the daily folder has no content.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Basically the only thing I can think of is that there is some communications error.. Try connecting to the mysql server from a command line on the server running the script using the same username and password used in the script to test that the communications isn't a problem..
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I found the problem.
I forgot to place the backup server in the remote´s access host list.
Now is working like a charm.
Once again, many thanks for this amazing script.
And now that I have the backup sql in another server (B), is it possible to automatically restore this sql to server (B), so I can have two DBs mirrored almost in real time ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
First of all, I'd like to thank wipe_out for this cleaver and intelligent script.
Backing up local DBs works like a charm.
But when I try to backup remote servers (DBHOST = xxx.xxx.xxx.xxx or DBHOST=mydomain.com), the script runs and creates the directory structure, but the daily folder has no content.
Do you get anything in the error log?
Basically the only thing I can think of is that there is some communications error.. Try connecting to the mysql server from a command line on the server running the script using the same username and password used in the script to test that the communications isn't a problem..
I found the problem.
I forgot to place the backup server in the remote´s access host list.
Now is working like a charm.
Once again, many thanks for this amazing script.
And now that I have the backup sql in another server (B), is it possible to automatically restore this sql to server (B), so I can have two DBs mirrored almost in real time ?
You could enable the "LATEST" option on the backup script and then create another script to restore the latest backup to your second server..
Just call the restore script as a "POST" option in the configuration of the backup script or execute it with cron after the backup scripts has run..
I added the "LATEST" option but the result file still is mydb_week.23.2006-06-10_17h37m.sql.gz so I can not automatize.
Is it possible to change the script so the result file name is always the same, lets says latest_mydb.sql.gz for instance?
This way I can add a cron job to run mysql -u -p mydb < latest_mydb.sql.gz