There are a few ways to transfer files, but the obvious choices didn't work for me. First I thought about using server-to-server transfer with my ftp client, but could never get it to work for some reason. Downloading locally, then uploading to the new host was not realistic, because my outbound throughput from home is about 45KB/s.
I decided to write a PHP file that gets placed on the destination server. I configure the variables to point to my source/destination files and let it rip. Just moved a 700MB file in 80 seconds. I estimate it would have taken more than 4 hours to upload from home.
Here is the script output: Executed move in 80.299180030823 seconds
You just need to put your files into a bunch of reasonably sized archive files (zip or tar). If you try to do too much at once, the request will time out and the transfer will die. You can modify this to do some sort of looping or whatever, that's all on you.
Why are you changing hosts? In the event all of those files caused some sort of problem with the TOS on your old host, you must make sure you aren't violating any terms with Dreamhost. They have similar restrictions to most other hosts. If it's just because you think you might like the service here...you will!
*makes fart noises at CPanel*
<?php
$time_start = microtime(true);
$ftp_server = 'ftp.oldserver.com';
$ftp_user_name = 'ftpuser';
$ftp_user_pass = 'ftppass';
$server_file = '/path_to_file_location_on_ftp_server/zipped_archive.tar';
$local_file = '/home/username/your_domain_folder.com/some_directory/zipped_archive.tar';
$conn_id = ftp_connect($ftp_server);
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
if ((!$conn_id) || (!$login_result)) {
echo "FTP connection has failed.
\n";
echo "Attempted to connect to $ftp_server for user $ftp_user_name.
\n";
exit;
} else {
echo "Connected to $ftp_server.
\n";
}
//DOWNLOAD
$download = ftp_get($conn_id, $local_file, $server_file, FTP_BINARY);
if ($download) {
echo "Successfully written to $local_file\n";
} else {
echo "There was a problem\n";
}
ftp_close($conn_id);
$time_end1 = microtime(true);
$exectime1 = $time_end1 - $time_start;
echo "Executed move in $exectime1 seconds\n
";
?>
http://benconley.net
http://teamshocker.com