Hi,
Assuming that you are using MySQL, you may want to look at the mysqldump command.
The following command dumps your database (for the purposes of this example called 'db).
mysqldump -p db | gzip > db.contents.gz
Then assuming you need to restore it into a new BLANK database called 'db' again.
gunzip < db.contents.gz | mysql -p db
There are many options on the mysqldump command, please check the manual for more info.
GC