Monday, January 3, 2011

Script to Restore multiple accounts from another server. Cpanel.

Copy the backup files of cpanel in *.tar.gz to the new servers /home. After that open a screen.
1) $ screen

2)Then run the following script in the screen.
$ for i in `cat file1`; do /scripts/restorepkg $i; done
Note:in file1 the usernames must be present. For that run this script.
(for i in `cat /etc/trueuserdomains`; do echo $i|cut -d . -f1; done > file1)

3)Then exit from screen.
press ctrl + a + d.

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Affiliate Network Reviews