source: TOOLS/SYNCHRO_SCRIPTS/synchro_igcmg_to_ciclad @ 4093

Last change on this file since 4093 was 4093, checked in by acosce, 6 years ago

sauvegarde des scripts permettant la synchronisation des donnees inter centres

File size: 1.2 KB
Line 
1#!/bin/bash
2
3cd /ccc/work/cont003/igcmg/igcmg
4echo "Verification des droits des repertoires TGCC"
5ccc_shspace_chmod userread /ccc/work/cont003/igcmg/igcmg/IGCM
6is_problem=` ccc_shspace_modck IGCM |grep ccc_shspace_chmod |wc -l`
7if [ "x${is_problem}" != "x0" ] 
8then
9  echo "Il y a un probleme de droit sur un repertoire qui ne vous appartient pas"
10  echo "vous pouvez utiliser la commande ccc_shspace_modck IGCM pour savoir qui doit mettre a jour les droits"
11  echo -n "voulez-vous tout de meme continuer la synchronisation [oui/non]"
12  read reponse
13  case ${reponse} in
14  non|NON|N|n)
15  exit 
16  ;;
17esac
18fi
19
20echo " Resultat du rsync en dry-run : "
21echo ""
22rsync -n -vrltgoD --progress --delete -e "ssh -ax -o ClearAllForwardings=yes -c blowfish"  --exclude='IGCM/CMIP6/*'  IGCM igcmg@ciclad.ipsl.jussieu.fr:/prodigfs/ipslfs/igcmg
23
24echo "Voulez vous effectuer les actions listees ci dessus oui/non ?"
25echo -n " Votre reponse : "
26read reponse
27
28case ${reponse} in
29
30oui|OUI|o)
31rsync -vrltgoD --progress --chmod=o-w --chmod=g-w --chmod=u-w --delete -e "ssh -ax -o ClearAllForwardings=yes -c blowfish"  --exclude='IGCM/CMIP6/*'  IGCM igcmg@ciclad.ipsl.jussieu.fr:/prodigfs/ipslfs/igcmg
32;;
33non|NON|n)
34echo "RIEN A FAIRE !"
35;;
36*)
37echo "Reponse non reconnue"
38;;
39esac
40
Note: See TracBrowser for help on using the repository browser.