Have a look at Postgres Schemas (which are very easy to use)
It is generally a good practice to use a different schema from the default public schema. The reason is that when you export the database, you get all the PostGis objects, functions, tables, etc which are installed there.
What I do is that I create a schema in the database, say "data"
create schema data;
I then set that schema to be the default by using the
alter database "mydb" set search_path=data,public;
It is not absolutely necessary to set the search path, you could user the reference to the table as schema.table
data.mytable
in all your table names, but the using the default means you can move data between schema's and one simple SQL command switches between them, great for upgrading production data, etc
When you export the database, just export that particular schema using pg_dump with
--schema=schemaName
If you have a bunch of tables to move between schema's, you can use the following SQL
create schema data;
alter database "**DBNAME**" set search_path=data,public;
DO
$$
DECLARE
row record;
BEGIN
FOR row IN SELECT tablename FROM pg_tables WHERE schemaname = 'public' -- and other conditions, if needed
LOOP
EXECUTE 'ALTER TABLE public.' || quote_ident(row.tablename) || ' SET SCHEMA data;';
END LOOP;
END;
$$;
When you restore into another database, restore it to a schema other than public, in this way you will never get any conflicts with objects in the public schema and it makes it so easy to just backup and move your spatial data around