perform cleanup before doing a backup