IndianWebPortal.com

Something Different In Linux

Home » cpanel » Script for create package on cpanel server

If you want to migrate more accounts from one server to another server then you need to create packages for each accounts . You can easilly create packages by using this script.

1) Create one Migarting-Accounts.txt file and add the the user name , which you want to create packages.
2) Create Migration directory for to move all the cPmove files from /home directory to Migration directory.

then use following command to create cpmove packages and moved to “Migration” directory.

for i in `cat /home/Migarting-Accounts.txt`;do /scripts/pkgacct $i; mv /home/cpmove-$i.tar.gz /home/Migration/;done

or

===========================

For migrating Reseller and/or Bulk accounts between cpanel servers::

For Reseller::

cat /etc/trueuserowners  | grep username | awk '{print "/scripts/pkgacct "$1}'

OR

1. cat /etc/trueuserowners  | awk '{print $1}' > 1.txt

then remove the sign “:” from 1.txt
for i in `cat 1.txt`;do /scripts/pkgacct $i; mv /home/cpmove-$i.tar.gz /home/Migration/;done

Then move the “Migration" folder and 1.txt file to remote server and by using following command restore all the accounts.

for i in `cat 1.txt`;do /scripts/restorepkg $i;done

===========================



Popular Posts

remove index.php fro

How to remove index.php from url in magento Ans : If you ...

PHP-Java bridge on p

  What is php-java bridge? The php-java bridge is the php ...

Set expiration for y

If you want to set the expiration to your site ...

Warning: Parameter 1

Error: Warning: Parameter 1 to modMainMenuHelper::buildXML() expected to be a ...

domain pointing to e

If you domain uses external MX record and it is ...