|
Posted by Tom on 12/20/07 18:32
On Sat, 8 Dec 2007 07:42:07 -0800 (PST), aj wrote...
>
>Hello all.
>
>I use 1and1 as my webhost.
>
>Using their configuration, the web server and mysql server are 2
>different machines.
>
>I have a web application that uses 2 database tables. I am looking
>for a convenient way to get backup's of the database tables at a click
>of a button on an admin section of my website. So far, I have had no
>luck.
>
>My latest attempt involved the following steps:
>
>1) Running a system command to put the database tables in a file:
>system("mysqldump -h $dbhost -u $dbuser -p $dbpass $dbname >
>$backupfile");
>
>2) Composing an email using php's Mail library and adding the
>aforementioned backup file as an attachment.
>
>Anyone have any experience with this? Offer any insight?
>
>Thanks,
>AJ
If you are running your system on a Unix/Linux platform you can use Cron to
schedule automated backups, like mysqldump, and create other scripts to email
yourself files. Since those normally happen outside the Web, you may be better
off creating a non-PHP based script to automate the email.
Tom
--
Newsguy Free Trial Accounts increased to 20 GB
http://newsguy.com/overview.htm
Navigation:
[Reply to this message]
|