Need help with CrashPlan - Last Backup Extension Attribute

kmitnick
New Contributor III
New Contributor III

Hello All,

I have a crashplan pro account and I would like to report on the last time the backup ran on all Macs that use crash plan. I downloaded the extension attribute listed here: https://jamfnation.jamfsoftware.com/viewProductFile.html?fid=72

When configuring the variables at the top of the script, I'm a bit confused on what to use for the server address. My crash plan pro account is not on premises and is hosted in the cloud.

If anyone can clearly explain what goes in the following variables, I'd greatly appreciate it.

#!/bin/sh
CP_ServerAddress=“NotSureWhatGoesHere” (Would this be the web address of the server?)
CP_ServerPort="4285"
CP_AdminUsername=“myadminAddress” ( is this my crash plan login account name)
CP_AdminPassword=“myPassword” ( is this the password for the crash plan login account)

If someone can post some dummy info for their setup,that would be great.

Thanks to all.

Keith

7 REPLIES 7

kmitnick
New Contributor III
New Contributor III

Hello All,

Is anyone using the crashplan pro extension attributes successfully? Are some to them dated?

I cannot successfully connect to the server no matter what I try.

Any help would be greatly appreciated.

Thanks

Keith

jacob_salmela
Contributor II

We just got the CrashPlan Last Backup Date working. The script from here had a syntax error that needed to be fixed:
https://jamfnation.jamfsoftware.com/viewProductFile.html?id=217&fid=625

In the line

DATA=`curl -q -u "$CP_AdminUsername:$CP_AdminPassword" -k "$SERVER/api/Computer?guid=$GUID&incBackupUsage=1" | sed -n 's/.*lastBackup": "([^"]*).*/1/p'`

there is whitespace after the colon, when there shouldn't be.

DATA=`curl -q -u "$CP_AdminUsername:$CP_AdminPassword" -k "$SERVER/api/Computer?guid=$GUID&incBackupUsage=1" | sed -n 's/.*lastBackup":"([^"]*).*/1/p'`

Making this change fixed the problem for us.

kmitnick
New Contributor III
New Contributor III

Jacob,

I appreciate your feedback on this issue. We are not using CrashPlan PROe, we use CrashPlan Pro. The extension attribute for CrashPlan Pro, does not have the line of code that you're referring to.

Thanks again.

Keith

Banks
Contributor

Hey Mr. Mitnick, you cannot use that script as written, as it queries the API, which is only available to ProE customers. You'll have to use some other watching of the /Library/Logs/CrashPlan/backup_files.log.0 log or similar, pardon I don't have access to a Pro version of the software.
Allister
@sacrilicious

kmitnick
New Contributor III
New Contributor III

Allister,

Thanks for providing that info. I guess the extension attributes that are available for CrashPlan Pro no longer work. Sounds like ProE is the only show in town for this.

Thanks again.

Keith

sean
Valued Contributor

On a train without it installed, but I think you'll want something like:

tail -r /Library/Logs/CrashPlan/backup_files.log.0 | head | grep -m 1 "Completed backup to" | awk '{print $2, $3}'

Alternatively, if you just want to know if it ran, then just grab the timestamp of this file:

stat -f%Sm /Library/Logs/CrashPlan/backup_files.log.0

kmitnick
New Contributor III
New Contributor III

Sean,

I appreciate your input.

I contacted Crashplan support and they confirmed what Allister Banks said in an earlier post. CrashPlan ProE is the only product that will query the API.

Thanks to all for the input.

Keith