Images being held waiting on SLP completion
I just cancelled a multi-petabyte backlog of SLP replications to a remote AIR target. nbstlutil told me that if I did it I would be expiring images that were being held for replication. This is fine - my remote copies are retained for less time than my local copies.
So, I'm keeping my local copy for 2 months & my remote copy for 2 weeks (It's just a DR copy, we only need the latest version over there. The local copies are for historical recovery).
If, for some reason, I haven't replicated an image after 2 weeks, I don't care about replicating it anymore. If it had been replicated, it would've been expired already. But,SLP's are persistent little buggers and will happily try until the end of time to get a copy over there.
I want to ID these images over 2 weeks old that haven't replicated yet and cancel them. Better yet, is there a parameter for SLP's that says, "give up on this image after X many hours"?
I think I need to build a script around nbstlutil but I can't figure out which params I need to identify uncompleted image replications.
Thoughts, anyone?
-Mark
Hi, Just thought you might want my solution that I made following your example above.
I send the output to a file with a csv extension and mail it to myself.export PATH=$PATH:/usr/openv/netbackup/bin/admincmd echo "Policy,Backup ID,Size (KB),Epoch Time,Date" >/tmp/output.csv for bpid in `nbstlutil list -image_incomplete -b` do bpimagelist -backupid $bpid | \ awk '{if($1=="IMAGE"){policy=$7 bpid=$6 k=split($6,array,"_") size=$19 timestamp=array[k] printf("%s,%s,%d,%s,%s\n",policy,bpid,size,timestamp,strftime("%b %e %Y %H:%M",timestamp))}}' done | sort -nk4 -t',' >>/tmp/output.csv echo "See attached report" | mail -a /tmp/output.csv -s "Backlog Report" someone@mycompany.com
It makes pretty columns, sorts it, and adds policy information per image.