Question For LINUX Experts: Migrating Server

Discussion in 'Site & Server Administration' started by xpgo, Aug 7, 2007.

  1. #1
    Hello,

    I have a hosting acount at some old server, with 8 gigs of content and some mysql databases.

    I'd like to know what is the best way of backup all files and transfer them into a new server.
    Maybe first using TAR for compress all files and then maybe SCP to transfer it ?

    Can someone please tell me how can i do it, or giving me a howto page ?

    Thanks
     
    xpgo, Aug 7, 2007 IP
  2. Estevan

    Estevan Peon

    Messages:
    120
    Likes Received:
    8
    Best Answers:
    1
    Trophy Points:
    0
    #2
    hello
    to tar directory
    tar -czvf archive.tgz files/
    send files
    scp myfile username@yournewhost:myfile
     
    Estevan, Aug 7, 2007 IP
  3. xpgo

    xpgo Peon

    Messages:
    146
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    can i make "scp *" for sending all files without "tar" them ?
     
    xpgo, Aug 7, 2007 IP
  4. InFloW

    InFloW Peon

    Messages:
    1,488
    Likes Received:
    39
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Is this server running any sort of control panel? Lots of panels include tools to transfer from one server to another.
     
    InFloW, Aug 7, 2007 IP
  5. Kommunicate

    Kommunicate Peon

    Messages:
    60
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    If you dont want to pay for the extra 8GB of bandwidth on both of your sites, it's best to compress your files first, then transfer them. It will go a lot faster too.

    If you have access to the shell, you can use mysqladmin to backup your MySQL databases, then compress those files along with any other content you have. If you don't have shell access, then your control panel should have an option to backup your databases and possibly your content.
     
    Kommunicate, Aug 7, 2007 IP
  6. powerspike

    powerspike Peon

    Messages:
    312
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #6
    have you though about using rsync over ssh
    it compresses what data it can
    and if the connection breaks you can resume it (pretty much from where it stoped).

    something like "rsync -r -e ssh -z -v username@source:/source/path /destination/path
     
    powerspike, Aug 8, 2007 IP
  7. xpgo

    xpgo Peon

    Messages:
    146
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    the problem is not bandwitdh....
    its difficult to use SCP for 8GB of data.... took 10 hours to transfer half of the data and then ssh connection went down....
    maybe i should try rsync...
     
    xpgo, Aug 8, 2007 IP
  8. powerspike

    powerspike Peon

    Messages:
    312
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #8


    if the connection is droping, rsync would be the best method

    it's main use is to "mirror" one location from another
    it generates a file list, and will only copy changed parts of files, or non exsistant files at the destination.
     
    powerspike, Aug 8, 2007 IP
  9. xpgo

    xpgo Peon

    Messages:
    146
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #9
    i'm trying again with scp command, now it should work.
    For anyone with same problem, do this:

    1) $ scp /folder/file-to-tranfer :/folder/file-destination-name > /dev/null 2>&1

    2) fill in passwd and press enter

    3) Type Control+Z

    4) Type "bg"


    I'll post results when done
     
    xpgo, Aug 8, 2007 IP
  10. horatiub

    horatiub Peon

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    rsync all the way
     
    horatiub, Aug 10, 2007 IP