Skip to main content
Question

iOS Backup Location on OSX

  • April 16, 2015
  • 1 reply
  • 0 views

Forum|alt.badge.img+4

Greetings all. Wondering if anyone would have any insight as to ways to remotely monitor, via the JSS, the OS X iOS Backup Location, typically found here -> /Library/Application Support/MobileSync/Backup.
We have quite a few laptops whose hard drives are over 80% full, some are actually at 100%. I suspect it's people backing up their iPhones/iPads and it's chewing up space. I'd like to be able to monitor this but not sure exactly how. One note: we don't use our JSS for iOS MDM, unfortunately. Wish we did, so it may be unavailable to do right off the top.

Anyone know of a way to do this?
Thanks.

1 reply

bpavlov
Forum|alt.badge.img+18
  • Esteemed Contributor
  • 1206 replies
  • April 16, 2015

I suppose you could create an extension attribute that does something like

#!/bin/bash

if [ -d "/Users/$3/Library/Application Support/MobileSync/Backup" ]; then
result=$(du -hs "/Users/$3/Library/Application Support/MobileSync/Backup" | awk '{print $1}')
echo "<result>$result</result>"
else
result="Does not exist"
echo "<result>$result</result>"
fi

I haven't tested it. But give it a try. Just note that it will only calculate the result for one user ($3 as per JSS variable) which is the user who is currently logged in. So if you have multiple users then you may need to change things up a bit by perhaps doing a for loop and adding up the results using perhaps the binary /usr/bin/bc. Good luck.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings