tar and untar user account?

chadi

BANNED
Apr 20, 2004
415
0
166
How do I tar a user's account and then untar it on another server properly?

What are the ssh commands?
 

eazistore

Well-Known Member
Nov 7, 2003
69
0
156
Singapore
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.
 

ddeans

Well-Known Member
Feb 13, 2004
296
0
166
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?
 

aykfounder

Well-Known Member
Feb 22, 2004
102
0
166
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