Generic data input/output with database backup