Made a db backup/restore helper for duplicate id errors.