add rsyncprod

This commit is contained in:
philc 2024-11-03 08:48:51 +01:00
parent 94b6308fb3
commit 0ccb4b2c7f

14
apxtri/setup/rsyncprod.sh Executable file
View File

@ -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