Thank you Neil,
I am writing a bash script to handle backups of my LAVA Server.
Due to some incompatibilities with Postgresql versions, I am obliged to drop lavaserver database and recreate lavaserver database before restoring the tables from my backup.
I can't use pg_restore due to incompatibilities with Postgresql versions. Postgresql-10 is no longer available for debian and the latest stable version of LAVA, LAVA 2018.4-1~bpo9+1, is based on Postgresql-9.6. When I set up LAVA in March 2018, Postgresql-10 was still available and I have been using that version. Now, to backup, I have to migrate the database from Postgresql-10 to Postgresql-9.6. pg_restore do not allow it.
So, I am dropping lavaserver database, recreating lavaserver database and pushing the tables from Postgresql-10 using psql -f instead of pg_restore. For that purpose, I need lavaserver's databse password in my bash script.
regards