pg_dumpallgz: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On Debian possible default full paths are:

/usr/sbin/pg_dumpallgz - from package: dms-core

You may install the required package with command apt-get install {package}
Error in other languages:
pg_dumpallgz: bevel nie gevind nie
pg_dumpallgz: comandă negăsită
pg_dumpallgz: comando não encontrado
pg_dumpallgz: commande introuvable
pg_dumpallgz: command not found
pg_dumpallgz: käsku ei ole
pg_dumpallgz: không tìm thấy lệnh
pg_dumpallgz: komanda nerasta
pg_dumpallgz: Kommando nicht gefunden.
pg_dumpallgz: kommandot finns inte
pg_dumpallgz: komut yok
pg_dumpallgz: nie znaleziono polecenia
pg_dumpallgz: níor aimsíodh an t-ordú
pg_dumpallgz: no se encontró la orden
pg_dumpallgz: no s'ha trobat l'ordre
pg_dumpallgz: opdracht niet gevonden
pg_dumpallgz: parancs nem található
pg_dumpallgz: perintah tidak ditemukan
pg_dumpallgz: príkaz nenájdený
pg_dumpallgz: příkaz nenalezen
pg_dumpallgz: команда не найдена
pg_dumpallgz: командата не е открита
pg_dumpallgz: 命令找不到
pg_dumpallgz: コマンドが見つかりません