SitePoint Sponsor |
|
User Tag List
Results 76 to 81 of 81
Thread: MySQL periodic backup with PHP
-
Mar 17, 2005, 01:20 #76
- Join Date
- Mar 2005
- Posts
- 314
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Small Windows OS modification for this tool
Great tool, easy to use and understand
I was investigating the script to ensure it could support both Windows and Linux. As it seems, the current script is ready for linux or compatible.
Would there be any issue by changing:
PHP Code:if ($remove_sql_file== "yes") {
exec("rm -r -f $filename");
}
PHP Code:if ($remove_sql_file== "yes") {
//exec("rm -r -f $filename");
if (file_exists($filename)) {
unlink($filename);
}
}
PHP Code:if($remove_gzip_file=="yes") {
exec("rm -r -f $filename2");
}
PHP Code:if ($remove_gzip_file == "yes") {
//exec("rm -r -f $filename2");
if (file_exists($filename2)) {
unlink($filename2);
}
}
Any suggestions would be appreciated
Thanks
-
Mar 22, 2005, 07:38 #77
- Join Date
- Sep 2001
- Location
- Panama
- Posts
- 2,181
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Lance,
As posted in another post, the 127 error means that the command was not found. Are you using the full path to the file?
Originally Posted by From PHP User Note
Community Guidelines | Community FAQ
"He that is kind is free, though he is a slave;
he that is evil is a slave, though he be a king." - St. Augustine
-
Mar 22, 2005, 07:45 #78
- Join Date
- Sep 2001
- Location
- Panama
- Posts
- 2,181
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by psalzmann
Community Guidelines | Community FAQ
"He that is kind is free, though he is a slave;
he that is evil is a slave, though he be a king." - St. Augustine
-
Jan 12, 2006, 21:57 #79
- Join Date
- Dec 2003
- Location
- 010
- Posts
- 4
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
how i can make it work in Safe_Mode ?
bouth , Dumb and restore ?
-
Jan 14, 2006, 18:44 #80
- Join Date
- Sep 2001
- Location
- Panama
- Posts
- 2,181
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Sorry but I can't think of anything to make this work in Safe Mode since pretty much every function that is able to execute commands is disabled or restricted.
Community Guidelines | Community FAQ
"He that is kind is free, though he is a slave;
he that is evil is a slave, though he be a king." - St. Augustine
-
Jan 15, 2006, 02:06 #81
- Join Date
- Mar 2001
- Location
- Northwest Florida
- Posts
- 1,707
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
As others have mentioned you can set up a cron job to run a script. I would suggest having the cron job to :
1) run mysqldump --- to dump the database into a file
2) run zip with recursion to compress the mysqldump file and the entire site into one zip file that is stored in an .htaccess protected folder.
3) Run a PHP script that notifies your client that the backup file has been created and create a link where they can http download the file, from a folder that is password protected (.htaccess) . Of course, give your client the user id and password and the download will start automatically.
I know this is an old thread, but thought I would throw in m two pence worth.intragenesis, llc professional web & graphic design
Bookmarks