PHP Script for MySQL Backup
Moderator: General Moderators
PHP Script for MySQL Backup
My host does not provide me with Shell Access nor access to SQL Binary Logs. Is there a way I could get incremental backups of my database?
You can use software - I like MySQL Auto Backup http://www.mysqlautobackup.com/
You can write a php script manualy or install phpmyadmin http://www.phpmyadmin.net/home_page/index.php and look at the php code generation features along with the export functions the software has and between the two you will be able to create a php script to back up your database to a sql file.
You can write a php script manualy or install phpmyadmin http://www.phpmyadmin.net/home_page/index.php and look at the php code generation features along with the export functions the software has and between the two you will be able to create a php script to back up your database to a sql file.
-
impulse()
- Forum Regular
- Posts: 748
- Joined: Wed Aug 09, 2006 8:36 am
- Location: Staffordshire, UK
- Contact:
I'm not sure, but I imagine you can still run shell commands using the exec command. It may be worth running a test, and if that's successful, using mysqldump. There's no reason why you couldn't be able to create the backup and move it into a web folder and download it over HTTP.
But as I say, I'm not sure what happens when you use exec, system or shell_exec when shell access is disabled.
Regards,
But as I say, I'm not sure what happens when you use exec, system or shell_exec when shell access is disabled.
Regards,
Tried it but maybe I'm not using it right... Will keep trying that anyways...
But just for learning new things, I wanted to know this technique please...
I've seen a few scripts repeat themselves repeatedly to complete the execution. For example, they keep dumping the database onto the webserver itself, refreshing the script itself. And before each refresh, it dumps around 2000 queries or say executes for around 15 seconds and then refreshes and then resumes... I want to know how this is done... Any advice please?
But just for learning new things, I wanted to know this technique please...
I've seen a few scripts repeat themselves repeatedly to complete the execution. For example, they keep dumping the database onto the webserver itself, refreshing the script itself. And before each refresh, it dumps around 2000 queries or say executes for around 15 seconds and then refreshes and then resumes... I want to know how this is done... Any advice please?