Web Hosting Talk







View Full Version : Best way to move/transfer data


haji
10-19-2001, 03:10 PM
Hello,

I have about 1 GB site with hundereds of scripts and files on a shared account. What started as a small site has become a portal. I am looking for a new host and in the meantime I also need to consider/plan how to move all my data with as little downtime as possible and less hassle.

Any advice would be appreciated.

thanks

erik
10-19-2001, 05:09 PM
If the content is constantly changing, like a message board or
a database where the users can upload data, it can be difficult
to transfer since a DNS change will take at least 24 hours.

No down time, but some users will update data on the new
server and some on the old one during a 24 hour period
depending on where (to which server) their local DNS server
sends them.

I would recommend you to do a
tar -zcpR /home/path-to-your-home-dir. Then transfer the file
over to your new host directly from the existing server with
ncftp or another FTP client that your existing host allows you
to use from the shell.
When the transfer is done just unpack the tar.gz file on your
new server with tar -xvf filename.tar.gz.

(tar -zcpR makes a tar.gz file and preserves all the file
permissions. Don't forget the R. Without that you will most likely
have to set all the file permissions again after the transfer.)

haji
10-19-2001, 05:17 PM
erik,

thank you very much for your reply. A few hours (even a day) of downtime is ok. I do not care about the forums etc., I care about a hassle free quick transfer without having to spend a lot of time, especially changing the permissions.

So, how do I do the second step (to ftp from one machine to another)? Could you tell me what the commands/procedure on that? I am on a redhat linux 6. and have telnet access.

Also, I have to change the DNS once I have unzipped the files on the new server, right?

thanks again

erik
10-19-2001, 05:33 PM
So, how do I do the second step (to ftp from one machine to
another)? Could you tell me what the commands/procedure on
that? I am on a redhat linux 6. and have telnet access.


First you will have to check if one of the providers give you
access to a FTP-client. Most likely they both will as long as you
have SSH or telnet access to the server. I would recommend
you to use NcFTP if that's available since it keeps you updated
on transfer speed and info on how much is left of the transfer.

You can either log on to your old host and get the file from the
old server, or the other way around.

Get the file from the old server:
ncftp -u USER -p PASSWD ftp.yourdomain.com
When you're logged in you navigate exactly like you do with
telnet/ssh. Get the file from the old server with the command
"get filename.tar.gz".

Send the file from the old server to the new one:
Log on to your new server like above, but use
"put filename.tar.gz" to send the file over to your new server.


Also, I have to change the DNS once I have unzipped the files on
the new server, right?


Yes. I would change DNS after you have transferred the files so
that you are sure everything works fine on the new server.

erik
10-19-2001, 05:39 PM
btw: Keep an eye on your traffic usage if you're charged by
the 95th percentile. 1GB of data transfer in an hour or two
will probably generate a peak unless you have a high
usage limit on your account ;)

Since you're leaving anyway, your old host will probably have
no doubts before they charge you extra for bandwidth usage :rolleyes:

haji
10-19-2001, 07:00 PM
Ok, thanks for the advice (especially the last post, something I would not have thought of) and I am sure my host will give it to me.

In that case, would it be possible to zip, transfer and unzip one or few directories at a time and would that help in terms of not using the bandwidth at one time? If so, could I do it like, tar -zcpR /home/path-to-my-dir I might do the cgis first and then the static directories later depending upon the size and there is a lot of static stuff that I do not need to move right away. For static directories I can group a few together and then put them in a temp dir, zipit up and transfer.

I think my account is paid for this quarter so I will take my time, will move the important stuff first.

erik
10-19-2001, 07:52 PM
That will work just fine. If you manage to keep track of what you
have transferred and what data you modify on the "old server"
afterwards ;) You should probably stick to transferring entire
directories and not single files though.