View Single Post

  #1 (permalink)  
Old 12-03-2007, 09:44 PM
vivekv vivekv is offline
Junior Member
User
 
Join Date: Sep 2007
My distro: CentOS
Posts: 12
Rep Power: 0
vivekv is on a distinguished road
Default Shell code for Restoring cpmove accounts(bulk amount)

Hello

My server's hard disk is going to replace tomorrow. I need this script very urgently. I have all account's backup as

Code:
username.tar.gz
generated by the cPanel/WHM backup function

I moved these files into another server using rsync and scp..

When I get the new hard disk with new OS installation, I need to restore these files very quickly. I know there is a function in whm for restoring files. but the total number of accounts are about 600+

So I can not do this way.
I know that this way I can restore accounts using ssh


Code:
/scripts/restorepkg username

So, I need to get a code for collecting all the usernames from the file "username.tar.gz" and applying this function as a loop

Urgently required.
Please help me

Thank you
Vivek
Reply With Quote