Copying a Postgres Database

I often have to test things on a pretty large database that takes forever to import. Today I learned you can just copy it so you don't have to reimport!