How to take snapshot for checkpoint from script

Hello,
does someone can help with subj.?
Situation:
running automation test, before crucial part i would like to take snapshot of checkpoint from script to use it after important part of test to check status of data.
Any suggestions?

I have same problem too., anyone can update??

Thanks