hooks: Add sample persistence handler

Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>