• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

MYSQL DB backup


Active Member
Hi guys and gals,
Right we need a way to automatically backup our MySQL databases remotely.
We have 100+sites that need to be backed up at least once a week and we want to have a copy of the SQL file.

All the servers are run by hosting providers so it can't be a cron job.

Any solutions?
Well what do you mean automatically?

Automatically create a dump on your server? On your workstation?

Automatically as in without any human involvement, or just a script that runs and does it all when you want it to?


Active Member
Jazajay said:
All the servers are run by hosting providers so it can't be a cron job.
Sunburn said:
You could write a cron job to do it mate, assuming they are all on the same server?
Assuming sites are on different servers, or they don't have cPanel access for cron jobs?


Active Member
Okay thanks peeps, been really busy but don't get me wrong I really do appreciate the time, honestly. :angel:

Right just to clarify as I think I could have done a better job by some of the responses so far, my fault, as I've got more clafication since as well. It wont change the answer(s) but I like to be spot on. Its now only 24-30 sites but with a look at more in the future. Basically all the other sites are backed up automatically by my boss man on a weekly basis then if it all goes wrong we have a copy, his specaility is servers and networking so I'll leave that to him.

But the sites he wants to have backup copies of the databases on a weekly basis are all Joomla based and are on the same hosting provider. They are with Heart, I think are where all our Joomla ones are located, the hosting side of things is the one area I have little control over. But he wants it done automatically encase one of our sites we manage employee screws up the DB it gets hacked etc... Not manually as one it would take time to do it, something with our current work load I couldn't really afford to allocate but if the guy who normally does it was off, sick hol, it wouldn't be done for 2 weeks and it would be in those 2 weeks it would need to be done, all ways is. : )

We also run our own server, not where the sites are located on. If the sql files could be backed up on to that maybe then they could be backed up with the weekly server backups at our end. However they would need to be remotely sent to our server first from thiers to do this.

I would imagine not but they are with the same provider.

Cant dude as we don't control the server per-say but good suggestion. :)

Cron jobs are in the Cpanel?????
Never noticed that and don't have access to my remote work station login at mo to test. Aww that may be what I need to look into, I will do when I get in Monday morning.

Now just encase that doesn't do it are there any other suggestions?
My boss says if it has to be a paid service then fair does, obviously I woulld prefer it not to be, makes me look better the more money I save but....

Thanks so far peeps very much appreciated.

Jaz :)


Active Member
Hi I have finally got back round to this. Again thanks for everyones time. :)
Right from a bit of looking I am asumming mysql dump is the way to go. Anyone have an idea how I run a MYSQLDUMP SQL command via PHP to achieve this though as I'm a little lost at that bit. :eek:

All answers will be highly appreciated, believe me. :)


Staff member
um.... ok different tack here :)

Just looked in my cpanel and I can see a 'web disk' option.

this is
The Web Disk feature is cPanel's implementation of the WebDav protocol. This feature allows you to manage files associated with your website. By creating an account and accessing your Web Disk, you can navigate, upload, and download files to and from your web server as though they were part of your personal computer.
and you could set this up to link to the database folder and then map it as a network drive on a pc/server.

Once mapped you can set up a one way backup of said folder using something like sync toy (free) and then schedule it to do it every x days.

So for the simplified version (I know you like my simple versions Jaz :p)

Server - set up web disk accounts for mysql database folder

On pc (ideally an always on server) - map web disk location to mapped address (I can explain more if needed)
Set up sync software to download from web disk on regular intervals.

Repeat for each server.

You can either stick them all in one location and then individual folder them or you can give each individual mapped drives.

A mapped drive is basically a drive from another computer/device (must be turned on) which will appear as a standard hard drive on another pc. I use this at home to map folders from my nas and they work very well.


Active Member
Thanks Levi. :)
Yeah your right I do like simple things, I mean ABC what now???? :confused:

Just had a look and mine/where I need to be running this doesn't appear to offer it (Heart in this case) I could be wrong but I don't see it. They do offer a scheduled file run thingy which is why I thought using PHP to generate a MYSQL dump and stick it in a file in a certain folder would be good then I could just direct the FTP to pick it up at a certain time then create another script to run after it which deletes the file thus not taking up too much space.

But I can't seem to work out how to get PHP to dump the database into a nice correctly formated file for me, I'm pretty sure it can be done. :)


Staff member
it's under the 'files' section in my cpanel if that helps, along with backups and backup wizard, file manager etc