Results 1 to 5 of 5
  1. #1

    Question 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.

  2. #2
    ssh on the old server then run:

    ftp new.server.com

    put file.tgz

  3. #3
    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()

  4. #4
    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)
    Mark - Owner/Lead Designer
    avidInteractive
    Lead vocalist for Circle7: Circle7 on MTV

  5. #5
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •