[4093] | 1 | #!/bin/bash |
---|
| 2 | |
---|
[5933] | 3 | echo "Cette script syncronise le repertoire IGCM/SRF avec quelque exception" |
---|
| 4 | echo "Pour synchroniser tout le repertoire IGCM/SRF ou tout IGCM, merci de faire passer les commands directement dans votre terminal." |
---|
| 5 | echo "" |
---|
[5118] | 6 | echo "Quel est votre login sur obelix ? " |
---|
| 7 | echo -n "Votre reponse : " |
---|
| 8 | read loginOBELIX |
---|
[4093] | 9 | |
---|
| 10 | cd /ccc/work/cont003/igcmg/igcmg |
---|
| 11 | |
---|
| 12 | echo " Resultat du rsync en dry-run : " |
---|
| 13 | echo "" |
---|
[5933] | 14 | echo "----------------------------------------" |
---|
| 15 | echo "----------------------------------------" |
---|
| 16 | echo " Attention la commande ne synchronise pas le répertoire ISIMIP2B dans son ensemble, pour l'instant ne sont pris que les ipsl 1degré historical et scénarios futurs" |
---|
| 17 | echo "----------------------------------------" |
---|
| 18 | echo "----------------------------------------" |
---|
| 19 | rsync -n --omit-dir-times -vrltgoD --chmod=u-w --chmod=o-w --chmod=g-w --progress --delete -e "ssh -ax -o ClearAllForwardings=yes -c blowfish" --exclude='METEO/ISIMIP2B/gfdl_*' --exclude='METEO/ISIMIP2B/hadgem_*' --exclude='METEO/ISIMIP2B/miroc_*' --exclude='METEO/ISIMIP2B/ipsl_piControl*' --exclude='METEO/ISIMIP2B/ipsl_*_halfdeg' --exclude='METEO/ISIMIP2B/ipsl_*_twodeg' IGCM/SRF ${loginOBELIX}@ssh1.lsce.ipsl.fr:/home/orchideeshare/igcmg/IGCM/ |
---|
[4093] | 20 | |
---|
[5933] | 21 | |
---|
[4093] | 22 | echo "Voulez vous effectuer les actions listees ci dessus oui/non ?" |
---|
| 23 | echo -n " Votre reponse : " |
---|
| 24 | read reponse |
---|
| 25 | |
---|
| 26 | case ${reponse} in |
---|
| 27 | |
---|
| 28 | oui|OUI|o) |
---|
| 29 | #rsync --omit-dir-times -vrltgoD --progress --delete -e "ssh -ax -o ClearAllForwardings=yes -c blowfish" IGCM ${loginOBELIX}@idefix1.extra.cea.fr:/home/orchideeshare/igcmg/ |
---|
[5933] | 30 | #rsync --omit-dir-times -vrltgoD --progress --delete -e "ssh -ax -o ClearAllForwardings=yes -c blowfish" IGCM/SRF ${loginOBELIX}@ssh1.lsce.ipsl.fr:/home/orchideeshare/igcmg/IGCM/ |
---|
| 31 | rsync --omit-dir-times -vrltgoD --chmod=u-w --chmod=o-w --chmod=g-w --progress --delete -e "ssh -ax -o ClearAllForwardings=yes -c blowfish" --exclude='METEO/ISIMIP2B/gfdl_*' --exclude='METEO/ISIMIP2B/hadgem_*' --exclude='METEO/ISIMIP2B/miroc_*' --exclude='METEO/ISIMIP2B/ipsl_piControl*' --exclude='METEO/ISIMIP2B/ipsl_*_halfdeg' --exclude='METEO/ISIMIP2B/ipsl_*_twodeg' IGCM/SRF ${loginOBELIX}@ssh1.lsce.ipsl.fr:/home/orchideeshare/igcmg/IGCM/ |
---|
| 32 | |
---|
[4093] | 33 | ;; |
---|
| 34 | non|NON|n) |
---|
| 35 | echo "RIEN A FAIRE !" |
---|
| 36 | ;; |
---|
| 37 | *) |
---|
| 38 | echo "Reponse non reconnue" |
---|
| 39 | ;; |
---|
| 40 | esac |
---|
[5933] | 41 | |
---|
[5943] | 42 | echo "Mise a jour des droits sur les repertoires de donnees (obelix), presse entree" |
---|
| 43 | read pause |
---|
| 44 | ssh ${loginOBELIX}@ssh1.lsce.ipsl.fr "setfacl -R -m u::rwX,g::rwX,o::r-X /home/orchideeshare/igcmg/IGCM" |
---|
| 45 | |
---|
| 46 | |
---|