This package can be used to take backups and restore a MySQL database.
There are two classes: one that queries a given database and saves its contents to a backup file, and another that reads a backup file and restores the contents of the database tables.