Skip to main content
Question

Any harm in a daily Distribution Point replication script?

  • March 27, 2012
  • 3 replies
  • 21 views

Forum|alt.badge.img+12

With Casper 7.x we used to be able to schedule an automatic replication to the slave dist points. I really missed that functionality and finally wrote a short and simple script to do a similar task. I'm wondering if there was an issue with this in the past which is why it is missing now... or if it was simply to support other platforms.

This script has proven to work fine... I have then tested a sync from Casper Admin, and nothing is missed or deleted that shouldn't be.

Here's my script... it is scheduled nightly with a LaunchDaemon and takes it's host names from a text list. It uses key authentication so as not to require a login prompt per host. Some of the rsync options are there incase someone wanted to run it manually... they would then see the output.

#!/bin/bash
for server in $(cat /admin/scripts/DistPoints.txt)
do
    /usr/bin/rsync -ahv -e ssh --delete --progress --stats /admin/CasperShare/ root@$server:/admin/CasperShare/
done

exit 0

3 replies

Forum|alt.badge.img+12
  • Author
  • Contributor
  • March 27, 2012

The only issue I could see is if you change the master dist point. We have done this on occasion if a tech at another site has a large package to upload... we will swap the master temporarily to allow them to upload it locally and sync back. Someone would have to know that the rsync script is there, otherwise they may mess up what work was just done.


Forum|alt.badge.img+18
  • Valued Contributor
  • March 27, 2012

i started looking at my servers after this, and has Jamf removed the automated sync's of the servers and distribution points, my servers have not sync'd in months.


Forum|alt.badge.img+12
  • Author
  • Contributor
  • March 27, 2012

Nessts, I don't know if they have went back and removed what was there originally, but we have built all new dist points since then. Since version 8.x when they started supporting other platforms, this built-in functionality was lost.