Migration de Paris vers Montréal
base de données :
mysql owncloud
UPDATE oc_appconfig SET configvalue="ldap.ca.auf.org" WHERE configkey="ldap_host"; UPDATE oc_appconfig SET configvalue="o=AuF" WHERE configkey="ldap_base" OR configkey="ldap_base_users" OR configkey="ldap_base_groups"; UPDATE oc_appconfig SET configvalue="(&(objectClass=person)(ou=People))" WHERE configkey="ldap_userlist_filter"; UPDATE oc_appconfig SET configvalue="mail=%uid@auf.org" WHERE configkey="ldap_login_filter"; UPDATE oc_ldap_user_mapping SET ldap_dn=concat("mail=",owncloud_name,",ou=people,o=auf"); UPDATE oc_appconfig SET configvalue='https://nuage.auf.org/mellon/login?ReturnTo=https%3A%2F%2Fnuage.auf.org%2F%3Fapp%3Duser_servervars' WHERE appid='user_servervars' AND configkey='servervars_sso_url';
shell :
service apache2 restart
Copie du Nuage pour tests
Principe : reconstruction du CT 308 (nuage7.auf.org) sur la base du CT 309 (nuage.auf.org)
Côté hôte
suppression du CT 308 :
vzctl stop 308 umount /vz/private/308 for lv in root var srv; do lvremove serveurs-virtuels/308-patrick-$lv; done
snapshot du CT 309 :
vzctl stop 309 for lv in root var srv; do lvcreate --size 5G --snapshot --name 308-patrick-$lv serveurs-virtuels/309-owncloud-$lv; done vzctl start 309 lvresize --size 20G serveurs-virtuels/308-patrick-srv
ajustement du CT 308 :
mount /vz/private/308 cd /vz/private/308 sed -i 's/199.84.140.46/199.84.140.44/' etc/network/interfaces sed -i 's/199.84.140.46/199.84.140.44/;s/nuage/nuage7/g' etc/hosts sed -i 's/nuage/nuage7/g' etc/hostname sed -i '/ServerName/s/nuage/nuage7/;/Redirect/s/nuage/nuage7/' etc/apache2/sites-available/nuage.auf.org vzctl start 308
Dans le CT 308
base de données :
mysql owncloud
UPDATE oc_appconfig SET configvalue='https://nuage7.auf.org/mellon/login?ReturnTo=https%3A%2F%2Fnuage7.auf.org%2F%3Fapp%3Duser_servervars' WHERE appid='user_servervars' AND configkey='servervars_sso_url'; UPDATE oc_appconfig SET configvalue='https://nuage7.auf.org/mellon/logout?ReturnTo=http%3A%2F%2Fwww.auf.org%2F' WHERE appid='user_servervars' AND configkey='servervars_slo_url';
shell :
service apache2 restart