User Tools

Site Tools


vps:mega_migrate
for i in `vzlist|awk '{print $1}'`;do echo $i && vzctl exec $i  cat /etc/httpd/conf/httpd.conf|grep 19;done
for i in 633;do echo vzctl exec $i sed -i -e "'"s/`vzctl exec $i  cat /etc/httpd/conf/httpd.conf|grep 193|grep "<VirtualHost"|awk '{print $2}'|cut -d: -f1|uniq`/`vzlist|grep $i|awk '{print $4}'`/g"'" /etc/httpd/conf/httpd.conf "&&" vzctl exec $i apachectl restart|sh;done
select vh.hostname,v.ve_id,a.admin_email, t.name,u.diskusage/1024  \
from subscr_ve as v, ve_statistics as u, ve_status as vest,hw as vh, \
account as a,address as s,subscr_base as t where a.address_id=s.address_id \
and a.account_no=t.account_no and u.ve_id=v.ve_id and v.subscr_id=t.subscr_id \
and t.status=1 and u.diskusage/1024 < 20000 and vest.ve_id=v.ve_id and \
vh.hw_id=vest.hw_id and   vest.hw_id < 22 order by u.diskusage/1024 limit 100;
for i in {1864,1789,1884,1761,1725,1105};do scp /etc/sysconfig/vz-scripts/$i.conf \
root@67.29.130.18:/etc/sysconfig/vz-scripts/;rsync -av -e ssh /vz/private/$i \
root@67.29.130.18:/vz/private/;vzctl stop $i;mv /etc/sysconfig/vz-scripts/$i.conf \
/etc/sysconfig/vz-scripts/$i.conf.migrated;done
for i in {2,4,6,8,10,12,14,16,18,20};do ssh root@67.29.130.$i 'echo "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAykWh0u6fC6rXSxt8KjfP2NuWdvLPXjscXpFlOyr4UblR8dyt\
PS6IzR7RKj3IHPRkx8Ru2w0vPpIutk67atT9FF+DQBHC1F9+fG+q6KfnsvARO5PX/a05D/oupnWX2\
b+bWitJ7SMni+TXEJYpE+PyNZOsn4JbuB9tGrAAFUkEy50= [email protected]"\
 >> /root/.ssh/authorized_keys';done
vps/mega_migrate.txt · Last modified: 2007/04/30 08:00 (external edit)