View Full Version : What PHP script could do that?

06-21-2010, 08:39 PM

I have mySQL database, and so much info in there :)

I faced a problem when I tried to create PHP auto-saving script. Below is how it should work:

1. Every week it runs itself automatically. (Also I could run it if impossible to do automatically)
2. It would copy all my tables and rows into FORMAT which I could use to RESTORE my database if it will be damaged.
3. All must work via PHP.
4. The files (FORMATS) must be saved into my domain path (Like: www.hhh.com/secret/)
5. The files (FORMATS) must be safe. Only I could access them.

A lot of things I want, but if you help me - maybe you will help others who have considered this.

Many thanks guys :) Good luck, and write your suggestions. Every suggestion is valuable.

06-21-2010, 09:33 PM
Here's the best place to start:

06-21-2010, 09:43 PM
If you have cpanel you can backup your mysql files using that.

Also, you're specifying to backup your files on your own server. You don't really want to do that: if your server crashes you can't get to your backed up files.

06-21-2010, 10:15 PM
I am using phpmyadmin... I know how to export info manually. The problem is HOW to do the PHP script, which would save exported files into directory...

And all I will have to do is just to "trigger" PHP script once a week :)

06-21-2010, 10:37 PM
As rfresh mentioned ....
Perhaps you can do the backup and automatically email you the file as an attachment.
That way, you save it on your local PC in case the server crashes.

06-21-2010, 10:57 PM
Do to it automatically, the only way I know of doing it (on an Apache server) is setting a cronjob.