The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

tar and untar user account?

Discussion in 'General Discussion' started by chadi, Jul 2, 2004.

  1. chadi

    chadi BANNED

    Joined:
    Apr 20, 2004
    Messages:
    415
    Likes Received:
    0
    Trophy Points:
    0
    How do I tar a user's account and then untar it on another server properly?

    What are the ssh commands?
     
  2. SarcNBit

    SarcNBit Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    1,010
    Likes Received:
    3
    Trophy Points:
    38
  3. eazistore

    eazistore Well-Known Member

    Joined:
    Nov 7, 2003
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Singapore
    Hi chadi,

    How about this:

    SSH to your server and run this command
    /scripts/pkgacct2 username ---> this will tar the user account
    cd /home --> change directory to user home
    chmod 755 username.tar.gz --> set the permission
    mv /home/username.tar.gz /home/youraccount --> move the file to your OWN folder as you wish

    Then open a FTP session and you should be able to see the username.tar.gz at your /home/youraccount folder
    Download it to your locak and upload to the other server later.

    ------------------
    At your another server:
    Upload the username.tar.gz to your another server.
    SSH to your server and run this command.

    mv /home/youraccount/cpmove-username.tar.gz /home --> move the file to the home directory
    /scripts/restorepkg username --> restore the account fully
    rm cpmove-username.tar.gz --> remove the .tar.gz file
    Lastly go to WHM and DNS/Name Server (BIND)

    Hope this helps.
     
  4. ddeans

    ddeans Well-Known Member

    Joined:
    Feb 13, 2004
    Messages:
    296
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Maryland
    This works if it is not a large site..

    What if it outputs these kinds of zips:

    cpmove-download.tar.gz.part1???


    How would your restore that?
     
  5. aykfounder

    aykfounder Well-Known Member

    Joined:
    Feb 22, 2004
    Messages:
    102
    Likes Received:
    0
    Trophy Points:
    16
    I am having some problems with this as well.

    First of all, here's how you can tar and move the tar to your new server without any problem and without using ftp:

    1. /scripts/pkgacct username
    2. To move to the new box use, type in on the source box 'scp /home/cpmove-username.tar.gz 1.1.1.1:"/home" where 1.1.1.1 is the destination ip, prior to this, package all of the accounts!
    3. To restore, login to your destination server and type /scripts/restorepkg cpmove-username.tar.gz

    Now, I also have a few large files that have part1, part2 etc.. and I am not sure how to deal with them. I tried doing /scripts/restorepkg cpmove-username.tar.gz.* but to no avail, it can't even find the file, says that there are not archives in the /home dir, when in fact, there are, I checked using the ls command.

    Any help on what I am doing wrong with the restorepkg command?

    Thanks
     
Loading...

Share This Page