Skip to content

Instantly share code, notes, and snippets.

@michaelcoyote
Created August 14, 2014 23:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelcoyote/b0ebacccfacf3204e431 to your computer and use it in GitHub Desktop.
Save michaelcoyote/b0ebacccfacf3204e431 to your computer and use it in GitHub Desktop.
Reprocesses an Avamar replication report to remove recently backed up clients and show unreplicated historical data over x days.
#!/usr/bin/awk -f
# remove unreplicated avamar clients from the replreport
# that are less than a day or so old.
# useful in cases where you have a day to get data offsite
# and only want to see older unreplicated clients.
#
BEGIN {printf "%-63s %s %s\n","Client","Difference","Dest Total"}
/^[A=]/ {next};
/^SOURCE/ {sgrid=$2};
/^DESTINATION/ {dgrid=$2};
int($4)<-7 {++unsynced; printf "%-70s %s %s\n", $1, $4, $3};
/^Clients\ checked/ {clients=$3}
END {print "\n "unsynced" clients are unsynced out of "clients" for a total of "unsynced/clients*100" percent unsynced between "sgrid" and "dgrid"\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment