how to take postgres server backup skipping some of databases?
Instead of using pg_dumpall, just use pg_dump and specify which databases you want to dump.  One possible way to do it is:

for db in &lt;space-separated list of database names&gt;
do
  pg_dump -U &lt;user&gt; -h &lt;host&gt; ${db} &gt; ${db}.dmp
done