Results 1 to 5 of 5
-
09-25-2004, 09:46 AM #1Newbie
- Join Date
- Sep 2004
- Posts
- 5
How to transfer server to server? SSH old server only. New server ftp only.
How to transfer a big-size file from old server to new server with ssh access on old server only. New server only has ftp access.
I don't want to download the file to my computer and upload it to the new server again, or install any other ftp software.
Any unix command to use on old server (wget?) to transfer the file? Anybody knows? Thanks.
-
09-25-2004, 09:52 AM #2Junior Guru
- Join Date
- Oct 2002
- Posts
- 229
ssh on the old server then run:
ftp new.server.com
put file.tgz
-
09-25-2004, 11:50 AM #3/me dawns tinfoil hat
- Join Date
- Jul 2004
- Location
- Scottsbluff, NE
- Posts
- 1,965
wget wouldn't work, because thats pulling a remote file onto the server
as darksoul said just ssh to the old server and do it the way he said$this->hasFlavr() ? $nom->nom('nom') : $want->doNot()
-
09-25-2004, 12:03 PM #4Designer
- Join Date
- Apr 2002
- Posts
- 2,195
One thing to remember is that you will be creating this tar.gz in your home directory, but the tar.gz file will not include the archive itself, in the backup, otherwise you could create vicious loop.
To exclude the actual tar.gz file from being backed up too, you will will need to create an exclude file.
To do this, simply open your favorite text editor, and enter the following line into the file:
mybackup.tar.gz
If you would like to exclude any other files or directories, you may list them in this file as well (one per line)
Save this file as exclude.list and upload it to your old account (right outside of your public_html folder).
Login to your old server via ssh and issue the following tar command as ONE LINE (change "yourusername" to well umm yourusername):
tar czfX yourusername/mybackup.tar.gz yourusername/exclude.list yourusername
This will create the file, and store it right outside of your public_html folder, or in a new folder called "yourusername."
It may take a while, depending on the size of your account, for the server to finish the archive, but when it is complete.....
issue the above commands, as suggested by darksoul:
ftp new.server.com
put mybackup.tgz
Once it's on the new server, simply untar it (make sure it's in the right directory though, or you could have yourself a mess)
-
09-25-2004, 06:37 PM #5Web Hosting Master
- Join Date
- Dec 2001
- Location
- NYC
- Posts
- 1,902
Why not just call up one directory and issue:
tar -czvf filename.tar.gz directory/
that way, it'll tar and create one directory up from the one you want.