First in the server from which the accounts should be migrated use the following command,
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 PORT $file root@IP:/root
wait
ls -lh $file
rm -rf $file
done
cPanel Data restoration.
The script is given below. Move to the location whether the cpmove files are located and then execute the following.
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 PORT $file root@IP:/root
wait
ls -lh $file
rm -rf $file
done
cPanel Data restoration.
The script is given below. Move to the location whether the cpmove files are located and then execute the following.
# ls cpmove-*.tar.gz | awk -F- '{print $2}' | awk -F. '{print $1}' > file
# for i in `cat file`; do /scripts/restorepkg $i; done
# for i in `cat file`; do /scripts/restorepkg $i; done
No comments:
Post a Comment