Something tells me that there won’t be anything left but ice for our children and grandchildren….
I like the photo though
– Christa 2006-11-24 01:15 UTC
Sorry to keep asking programming stuff here, but…
Greywulf, that script snippet you gave me for backing up my db worked fine (I did it as a cron job), yet all of a sudden, it stopped working.
When I contacted my host, they said I could never have made a cron job, which is strange coz I have a load of backups from it…
Anywhooo, facts as they are, I can’t do cron jobs no more, so how can I incorporate that script to work with a submit button???
or use it with a button etc….
I suppose, I could even do it within a php include? what do you suggest?
Thanks in advance
– The Creator 2006-11-24 23:41 UTC
Sounds to me like they discovered that they’d accidentally allowed users to run cronjobs and turned it off. Shame, that.
I think this page answers your question pretty well. In short, just put a link to a page called, say, backup.php. In that page have a line like this (taken from the page above):
system("mysqldump --user=$dbuser --password=$dbpswd --host=$host $mysqldb > $filename",$result);
Then get it to reply back with a success or fail message, depending on whether $result is TRUE or FALSE. That should work.
Also get it to remove any old backups if there’s more than three in the system, otherwise the admins will complain about you filling up their hard drive!
Hope that helps.
– GreyWulf 2006-11-25 10:29 UTC