diff --git a/apxtri/setup/rsyncprod.sh b/apxtri/setup/rsyncprod.sh new file mode 100755 index 0000000..e9100ab --- /dev/null +++ b/apxtri/setup/rsyncprod.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# A REVOIR et à integrer dans un frontend +macle="/media/phil/BARN/Administratif/myworld/sshkey/philforwallants_rsa" +declare -a OBJETS=(articles jobads jobsteps jobtitles options persons quizz recruiters seekers sirets) + +for OBJET in "${OBJETS[@]}"; do + #rsync -p "$motdepasse" -avz -e "ssh -p 2230 phil@apptest.smatchit.io" /home/phil/apxtowns/testwall-ants/smatchit/objects/${OBJET}/ /media/phil/usbfarm/apxtowns/dev-ants/smatchit/objects/${OBJET}/ + rsync -avz -e "ssh -p 2230 -i ${macle}" --delete phil@apptest.smatchit.io:/home/phil/apxtowns/testwall-ants/smatchit/objects/${OBJET}/ /media/phil/usbfarm/apxtowns/dev-ants/smatchit/objects/${OBJET}/ + if [ $? -eq 0 ]; then + echo "$(date) - Synchronisation of $OBJET done." + else + echo "$(date) - Errorr synchronisation of $OBJET." + fi +done