Praji’s Weblog

Welcome to praji’s world

Data migration( cpanel)

leave a comment »

TRANSFER
—————
#!/bin/bash

for i in `cat /etc/trueuserdomains | awk -F: ‘{print $2}’`
do
/bin/echo “$i”
/scripts/pkgacct $i
file=$(ls /home/cpmove*$i*)
/bin/echo “$file”
scp -P  -B $file root@:/root
wait
ls -lh $file
rm -rf $file
done

RESTORE
————–
ls cpmove-*.tar.gz  | awk -F- ‘{print $2}’ | awk -F. ‘{print $1}’ > file
for i in `cat file`; do /scripts/restorepkg $i; done

Written by praji

June 28, 2008 at 4:31 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: