If I use phpmyadmin i can download a zipped version of the dump.
My provider has a (restricted) version of phpmyadmin in use and I can start skripts based on a timetable.
How can I write a php-skript to dump and send my database via email?
If I have a file I can emai it, the real problem is the dump.
automatic dump
Moderator: General Moderators
use mysqldump
something like
passthru ('/usr/bin/mysqldump -u username --password="mypass" --opt databasename | gzip -c')
will directly output the binary/compressed data.. if you need the data to a variable I suggest using `backticks` but i am not sure if that is binary safe.. If you want it directly to a file just add > filename at the end
something like
passthru ('/usr/bin/mysqldump -u username --password="mypass" --opt databasename | gzip -c')
will directly output the binary/compressed data.. if you need the data to a variable I suggest using `backticks` but i am not sure if that is binary safe.. If you want it directly to a file just add > filename at the end
That sound good, but I believe I cannot start any passthru on the server from my internet service provider.Stoker wrote: passthru ('/usr/bin/mysqldump -u username --password="mypass" --opt databasename | gzip -c')
Therefore I am looking for a "native" php Solution. phpmyadmin uses some functions i have seen in there php-files. But I cannot find any function to call for this.
Any other idea?