postgresql backup and restore
pg_dump is not an SQL command. It's a separate command, like psql. So you can't run it from within a psql session, you must run it from a regular shell.

The reason you're not getting an outright error is that you didn't write a semicolon on the end of the line. That's why the prompt changed, too:

postgres=# pg_dump test_site &gt; payroll.dump.out  
postgres-# ls
        ^ &lt;-- See how it goes from = to - ?


That indicates that it's a continuation line, so psql is buffering up a statement and hasn't sent it yet.