editing the backup script

bjseiler

Verified User
Joined
Jun 19, 2003
Messages
182
Can somebody give me the location of the script file that DA uses when running the reseller backups? Or, is that part of the DA binary that can not be changed?

Only thing I want to change is to add in some code to connect to the slave database server, stop the slave, run the backups, then start the slave back up. Some of the databases we have are too big and active and when the backup runs, some things get blocked while tables are locked.

I realize there are other backup solutions out there but if I can just edit what DA has in there, it would be much easier.
 
sysbk is the system backup; it is not the reseller backups.

I believe the backups are part of the DirectAdmin binary. Hopefully John will respond and let us know if there's any way to make changes.

Jeff
 
Hello,

So to confirm, you just want to "break" DA from grabbing the remote mysql backups, but shutting down the other server?

I have a solution, that doesn't require shutting it down at all.

Assuming, you're using the host= value in the mysql.conf file to allow DA to connect to mysql.. what you can do is temporarly change the host value to some other server.. or remove it completely. If you still have the local mysql server running, change it to 127.0.0.1 (or remove it) and ensure the da_admin pass is the same on this box too. (best to not have errors). Then swap it back when you're done.

Now to make this magic happen, we have the all_pre.sh, and the all_post.sh scripts.
http://www.directadmin.com/features.php?id=672

some samples:
http://help.directadmin.com/?query=all_pre.sh

So you'd use them to notice when a backup is going to be created (doesn't work for cron, but for cron you can create another cron to do it).. and chage the mysql.conf accordingly. Then with the all_post.sh, same idea, change it back.

if done correctly, you won't get any errors when DA checks the "local" (or other) mysql server as there wouldn't be any databases on it.

;)

John
 
I did not explain it very well but I think editing the files you guys have pointed me to will do the trick.


I have DA running on one machine. The same machine as acts as the mysql master. I have a separate machine that is solely a mysql slave. I want to stop the slave, do a full backup, and then restart the slave. Ideally I would like to tie this into the current DA backup system.

I don't want to do the regular backups on the master because it ends up locking tables for too long.

Thanks for the help!
 
Back
Top