Log in

View Full Version : What PHP script could do that?



auriaks
06-21-2010, 06:41 PM
Hi,

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.

traq
06-21-2010, 07:16 PM
PHP can't run automatically. You would need a cron job to trigger your backup script, or do it yourself.

Do you have phpmyadmin (http://www.phpmyadmin.net/home_page/index.php) available on your server? You can use the [export] feature to create backups of your database. You could save them locally or in a password-protected directory for security.

auriaks
06-21-2010, 08:11 PM
YES, I have phpmyadmin... Also, I can trigger that PHP script every week :D

I know how to export the info manually, but how to create a script which would do that[when I'll trigger it] and save the exported files into directory?