prune up and backup database