LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   mysql schema list and taking backup using php (http://www.linuxquestions.org/questions/linux-software-2/mysql-schema-list-and-taking-backup-using-php-903397/)

jindalarpan 09-16-2011 12:26 PM

mysql schema list and taking backup using php
 
Hello All

I am new to php so i am posting over here,
I need a help in doing to following.
I want to take the backup of mysql schema using web access, for setting up the same i need to firt put the list of schema and then from there once user selects the schema schema backup shuold start up and return the path on the server where the backup is kept.

i cant do this using phpmyadmin as it has limit on size of dump file.


kindly provide inputs

thanks

TB0ne 09-17-2011 02:55 PM

Quote:

Originally Posted by jindalarpan (Post 4473760)
Hello All
I am new to php so i am posting over here, I need a help in doing to following. I want to take the backup of mysql schema using web access, for setting up the same i need to firt put the list of schema and then from there once user selects the schema schema backup shuold start up and return the path on the server where the backup is kept.

i cant do this using phpmyadmin as it has limit on size of dump file.

Write a script that uses the built-in mysqldump program. The man page on mysqldump has details on all the options..you can do just one table, a whole DB, or a whole server. You can even use triggers, and table-locking, too, depending on how you call the program.

So, first step is to write the script to act how you'd like, and easily test it on the command-line. From there, use a PHP system call (system, exec, etc.), to call the shell script, and pass it whatever variables you'd like.


All times are GMT -5. The time now is 08:51 PM.