Myreader.co.uk  
uk news, chat and community
   home   |   control panel login   |   archive   |  
 
net
net
news.announce
news.config
news.management
news.moderation
providers
providers.aaisp
web.authoring
  
 
date: Thu, 24 Apr 2008 23:05:44 +0100,    group: uk.net.web.authoring        back       
Re: Migrate blog to new host   
In message , Geoff Berrow 
 writes
>Message-ID: <nXiPj.12819$yD2.11716@text.news.virginmedia.com> from Tony
>contained the following:
>
>>That's the problem - there are no tabs :)   I really think it must be Lycos
>>Europe's version of PhpMyAdmin that is odd.
>>
>>Anyway I have now decided I need to understand the whole thing better so I
>>have set up WAMP on my home Windows PC so I can play.  (After a few hiccups
>>of course!)   PHPMyAdmin on my own PC has two panes and tabs as you
>>describe, and I have successfully imported the tables that I dumped.  So I
>>am more confident of being able to transfer the tables to a new host.  Now I
>>will have a go at transferring the works of the blog to my home PC ...
>>Thanks for advice, no doubt I will be back for more!
>
>
>You may be able to find a backup script somewhere if you don't have any
>luck with the phpMyAdmin

Indeed - this is the PHP I use on a number of sites for the client to 
make a backup of the MySQL database.

//set the database parameters ready for the mysqldump command
$host = "";
$database = "";
$user = "";
$password = "";

$filename = "web_data_" . date("Y-m-d-H-i-s") . '.gz';

//set the site and directory in following line
$backupfile = "/home/site/backup_dir/".$filename;

//build the backup command
$command = "mysqldump --opt --host=$host --user=$user --password=$password $database | gzip > $backupFile";

//run the command
$result = system($command, $retval);

//serve the file to the user's browser
header ("HTTP/1.0 200 OK");
header ("Content-Type: application/x-gzip");
header ("Content-Disposition: attachment; filename=$filename");
readfile($backupfile);


-- 
Dominic Sexton
date: Thu, 24 Apr 2008 23:05:44 +0100   author:   Dominic Sexton {da-sep03}@dscs.demon.co.uk

Google
 
Web myreader.co.uk


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us