Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    BANNED
    Join Date
    Apr 2004
    Posts
    424

    Default tar and untar user account?

    How do I tar a user's account and then untar it on another server properly?

    What are the ssh commands?

  2. #2
    Member
    Join Date
    Oct 2003
    Posts
    1,020

    Default

    man tar

  3. #3
    Member
    Join Date
    Nov 2003
    Location
    Singapore
    Posts
    72

    Default Re: tar and untar user account?

    Originally posted by chadi
    How do I tar a user's account and then untar it on another server properly?

    What are the ssh commands?
    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. #4
    Member ddeans's Avatar
    Join Date
    Feb 2004
    Location
    Maryland
    Posts
    302

    Default

    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. #5
    Member
    Join Date
    Feb 2004
    Posts
    98

    Default

    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
    www.AYKsolutions.com
    Professional. Painless. Polite.

Similar Threads & Tags
Similar threads

  1. Replies: 1
    Last Post: 07-20-2009, 09:01 AM
  2. how to create new account with tar.gz file?
    By treo650 in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 06-18-2007, 01:00 AM
  3. /getbackup/backup-user-date-.tar.gz
    By fgauthier in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 05-24-2006, 01:31 PM
  4. Untar a file :@
    By slice16 in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 09-11-2005, 02:33 PM
  5. SP2 Backups tar.tar or tar.gz
    By JudgeJeffries in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 09-19-2004, 05:20 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube