I have to take backup of a remote server and restore it. So, whats the best way to take backup of whole server?
After logging into the root server i have tried:-
[root@server-14 ~]# pg_dumpall > clus.bak
pg_dumpall: could not connect to database "template1": FATAL: role "root" does not exist
So, i logged into the psql prompt with the superuser -U unify
[root@server-14 ~]# psql -U unify
psql (9.3.25)
Type "help" for help.
unify=# pg_dumpall -U unify37 -f ~/tmp/clus.sql
unify-#
But even this is throwing a error. The above two ways didn't get me a backup of server and have no idea what might be the problem .