Command to download the entire content from ftp to a specific location

Discussion in 'Site & Server Administration' started by Website_Playboy, Jun 28, 2012.

  1. #1
    Is there a command i can use in my new VPS so it will download my entire public_html from the old hosting company (either from ftp or whatever) to its own and locate all the files in public_html in the new host?
     
    Website_Playboy, Jun 28, 2012 IP
  2. livetecshosting

    livetecshosting Peon

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    livetecshosting, Jun 29, 2012 IP
  3. Website_Playboy

    Website_Playboy Member

    Messages:
    115
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #3
    So basically this is the command
    $rsync avz /path/to/your/content otherserver:/path/to/your/content

    but dont i have to put like hostname, user and passes?

    Can you give me one full example of how to use this?
     
    Website_Playboy, Jun 29, 2012 IP
  4. Hostwinds_Dan

    Hostwinds_Dan Active Member

    Messages:
    149
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #4
    I would not use rsync if you have access to FTP still. Use a program like FileZilla to connect to your old host, download the files, then upload them to your new host. Or, if you're able, connect via cPanel and get a full backup of your site. Only get your files via SSH as a last resort.
     
    Hostwinds_Dan, Jun 29, 2012 IP
  5. Website_Playboy

    Website_Playboy Member

    Messages:
    115
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #5
    I have quota on my internet connection. I dont want to use my quota and my website is 30gb.
     
    Website_Playboy, Jun 29, 2012 IP
  6. linux7802

    linux7802 Active Member

    Messages:
    110
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #6
    Simply login in to the new VPS shell as root user and run the following commands one by one.

    1st) Install the screen command ( Basics Of Screen Commands )

    yum install screen -y

    2nd) run the command screen, so that you will be able to run the command in the background.

    screen

    3rd) Now change the directory under which you want to download the public_html directory.

    For example ..

    cd /home/user/

    4th)Use the following command to download the public_html and its content from the old hosting account to the new VPS.

    wget -r ftp://username : password@ftp.example.com/public_html

    Note : use username : password without space between : user name and password

    In above syntax use the following details.

    Username : Your old host end FTP user
    Password : Your old host FTP user password.

    If you don't have any FTP user on the old host than 1st create it (Simple Steps To Create the FTP a/c from cPanel )

    ftp.example.com : If your domain name is resolving from the new VPS than use your old hosting provider end server ip instead of ftp.example.com
     
    linux7802, Jun 29, 2012 IP
  7. gombile13

    gombile13 Active Member

    Messages:
    136
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    63
    #7
    I like rsync, so I'd recommend you to use rsync, you must have ssh access on both server

    # rsync download (you can do this step from your new VPS)
    or

    # rsync upload (you can do this step from your old VPS)
    or use ftp with wget,

    the wget -r option will download your file recursively, so you can download all your content under /public_html/

    good luck
     
    Last edited: Jun 30, 2012
    gombile13, Jun 30, 2012 IP
  8. linux7802

    linux7802 Active Member

    Messages:
    110
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #8
    Do not use the rsync command, if you are not familiar with the rsync command because one single wrong slash will cause you major problem, so its always better to run the rsync command when ever any technical person available
     
    linux7802, Jun 30, 2012 IP