SSH: how to restore backup in different account?

Discussion in 'Site & Server Administration' started by Divvy, May 6, 2011.

  1. #1
    Hello guys,

    I need your help here...

    I made a full backup of my account and now I have a file called cpmove-account1.tar.gz in my /home

    I need to make some tests, so I created a new account with a subdomain and a different account with account2.

    My question is:
    How can I restore the backup of account1 to account2?
    account1 have domain www.domain.com and account2 have domain test.domain.com

    Basically I want to copy all files, folders, permissions and databases from account1 to account2.
    Is there any fast method to do that?
    I dont want to copy manually because is an account with 6GB and I need all folders and files permissions...

    Any suggestion? :)
     
    Divvy, May 6, 2011 IP
  2. WJunction

    WJunction Peon

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Firstly, are you using a control panel such as cPanel? If so, there's usually a little button there called "backup/restore" where you would upload that file.
     
    WJunction, May 6, 2011 IP
  3. Intermg

    Intermg Active Member

    Messages:
    1,282
    Likes Received:
    11
    Best Answers:
    1
    Trophy Points:
    65
    #3
    Yes, your best bet is to use "Restore" function in cPanel.
     
    Intermg, May 6, 2011 IP
  4. kardus

    kardus Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I don't use cpanel at all so I'm not sure about this backup importing, I normally use ssh/terminal commands. All you should really have to do is untar/compress that file in the new home dir of the new account, using the command: tar zxvf file.tar.gz. I would follow the other suggestions first if you've never done this before though.
     
    kardus, May 10, 2011 IP
  5. hans

    hans Well-Known Member

    Messages:
    2,923
    Likes Received:
    126
    Best Answers:
    1
    Trophy Points:
    173
    #5
    If you still have SSH access to OLD and NEW sites
    then by very far the easiest way to transfer an entire site with ten thousands of files OR MUCH MORE would be using rsync
    used directly on your new server, you rsync ALL incl file permission and folder/subfolder structures with a single command line from old to new

    if ever you had your own dedicated server before
    then you even can transfer ALL MySQL tables the same way (of course you have a MySQL backup the traditional way just in case)

    During the past 5 or so years, I did multiple server moves (first one from hosted to dedicated server, then all future root server to root server) this way without any loss of functionality, etc
     
    hans, May 19, 2011 IP
  6. Intermg

    Intermg Active Member

    Messages:
    1,282
    Likes Received:
    11
    Best Answers:
    1
    Trophy Points:
    65
    #6
    I used to use ftpcopy to transfer a bunch of files from one server to another on a complete autopilot. This is a nice tiny little program that works from a command line. You could copy the entire filesystem with a single command. :)
     
    Intermg, May 19, 2011 IP