stop excluding json files so rsync can clean up deleted templates

This commit is contained in:
John Bowdre 2022-09-19 09:27:26 -05:00
parent 693d93f649
commit 3a74c96264

View file

@ -10,7 +10,7 @@ fi
echo -e "[$(date +"%Y/%m/%d-%H:%M:%S")] Sync sync starts NOW!" echo -e "[$(date +"%Y/%m/%d-%H:%M:%S")] Sync sync starts NOW!"
# sync # sync
/usr/bin/rsync --progress --bwlimit=${SYNC_MAX_BW:-0} -e "ssh -l syncer -p ${SYNC_PORT:-2222} -i /syncer/.ssh/id_syncer -o StrictHostKeyChecking=no" -avh --stats --exclude '*.json' --exclude '.vSphere-HA' $SYNC_PEER:/ /syncer/library --delete || [ $? -eq 23 ] && true /usr/bin/rsync --progress --bwlimit=${SYNC_MAX_BW:-0} -e "ssh -l syncer -p ${SYNC_PORT:-2222} -i /syncer/.ssh/id_syncer -o StrictHostKeyChecking=no" -avh --stats --exclude '.vSphere-HA' $SYNC_PEER:/ /syncer/library --delete || [ $? -eq 23 ] && true
# handle removed files / remove directories # handle removed files / remove directories
grep '"files": \[\]' /syncer/library/*/item.json -l | xargs rm -f $1 grep '"files": \[\]' /syncer/library/*/item.json -l | xargs rm -f $1