there is a system table called sqlite_master. It contains the SQL CREATE statements for all objects.
So, all you need to do is to select all rows from this table, and run the sql statements.
You can also use Database->Export Database Structure, which will effectiveley do the same thing