View Single Post

  #2 (permalink)  
Old 12-03-2007, 10:36 PM
rockdalinux's Avatar
rockdalinux rockdalinux is offline
Contributors
User
 
Join Date: May 2005
Location: Bangalore
My distro: RHEL, HP-UX, Solaris, FreeBSD, Ubuntu
Posts: 581
Rep Power: 7
rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough
Default

You may need to run something as follows (assuing that you have resored /var/cpanel/user:
On main server (to backup)
Code:
for i in $(ls /var/cpanel/users)
do
 /scripts/pkgacct $i
done
Restore on another server (again assuming that you have updated file):
Code:
for i in $(ls /var/cpanel/users)
 do
  /scripts/restorepkg $i
 done
Do you have username.tar.gz for each user? or is it one file only? If you have username.tar.gz for each user, type:
Code:
for f in *.tar.gz; 
do  
  u=$(echo $f| cut -d'.' -f1); 
 /scripts/restorepkg $u ; 
done
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!

If you have knowledge, let others light their candles at it.

Certified to work on HP-UX / Sun Solaris / RedHat

Last edited by rockdalinux; 12-03-2007 at 10:39 PM..
Reply With Quote