pg_dump and pg_dumpall tools backup create zero size backup file from linux putty terminal
just after being a superuser of the shell, try with supplying superuser postgres as:

    pg_dumpall -f filename.sql -U postgres


or

    pg_dumpall -U postgres &gt; filename.sql


you do not need $bash-rc, just be superuser and run the commands, more info is here