Skip to content

Commit

Permalink
* fichiers de synchro (Cf. bascule Neptune2)
Browse files Browse the repository at this point in the history
  • Loading branch information
pzia committed Mar 2, 2015
1 parent a24e987 commit 8820413
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
5 changes: 5 additions & 0 deletions hosting/sync/sync@root.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

cp /etc/mysql/my.cnf.binlog /etc/mysql/my.cnf
/etc/init.d/mysql restart
/etc/init.d/apache2 restart
22 changes: 22 additions & 0 deletions hosting/sync/sync@vlm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/sh

cd
VLMRACINE=/home/vlm
echo "Passage en maintenance de N2"
~/scripts/maintenance.sh "Bienvenue sur Neptune2, nous rouvrons le service VLM bientôt" > sync1.log
echo "Passage en maintenance de N1"
ssh vlm@v-l-m.org "export VLMRACINE=/home/vlm && /home/vlm/scripts/maintenance.sh \"Ici Neptune1 : VLM vous retrouve bientot sur Neptune2.. Adieu !\"" >>sync1.log
echo "Export datas sur N1"
ssh vlm@v-l-m.org "export VLMRACINE=/home/vlm && /home/vlm/vlmcode/base/scripts/dump-alive.sh /home/vlm/tmp/vlmdump-alive.sql" >>sync1.log
ssh vlm@v-l-m.org "export VLMRACINE=/home/vlm && /home/vlm/vlmcode/base/scripts/dump-history.sh /home/vlm/tmp/vlmdump-history.sql" >>sync1.log
echo "Transport datas de N1 vers N2"
scp vlm@v-l-m.org:/home/vlm/tmp/vlmdump-alive.sql.gz ~/tmp/ >>sync1.log
scp vlm@v-l-m.org:/home/vlm/tmp/vlmdump-history.sql.gz ~/tmp/ >>sync1.log
echo "Import datas sur N2"
~/vlmcode/base/scripts/importdump.sh ~/tmp/vlmdump-alive.sql.gz >>sync1.log
~/vlmcode/base/scripts/importdump.sh ~/tmp/vlmdump-history.sql.gz >>sync1.log
echo "Import OK sur N2, sortie maintenance"
~/scripts/maj_module.sh site >>sync1.log
~/scripts/maj_module.sh lib/phpcommon >>sync1.log
~/scripts/maj_module.sh moteur >>sync1.log
echo "Done, Welcome Neptune2"

0 comments on commit 8820413

Please sign in to comment.