[if you assume I don’t know what I’m doing, you will be just very slightly wrong]
When I run pg_dumpall line you recommend, it insists on a password:
ds-admin@DSE-MFG95:~$ pg_dumpall -c --no-password -h localhost -U postgres > postgresbackup
pg_dumpall: error: connection to server at “localhost” (127.0.0.1), port 5432 failed: fe_sendauth: no password supplied
I should explain that, long time ago, I created CS V3 that I’m running using instructions from www.mobilefish.com; specifically this section:
Dumb Q: given those instructions, I presume password for pg_dumpall should be ‘dbpassword’, but I get same error: (it prompts for password & I type dbpassword)
ds-admin@DSE-MFG95:~$ pg_dumpall -c -h localhost -U postgres > postgresbackup
Password:
pg_dumpall: error: connection to server at “localhost” (127.0.0.1), port 5432 failed: FATAL: password authentication failed for user “postgres”
connection to server at “localhost” (127.0.0.1), port 5432 failed: FATAL: password authentication failed for user “postgres”
Just to see what would happen, I followed first line of #5, and output gave me a ray of hope:
ds-admin@DSE-MFG95:~$ sudo -u postgres psql
psql (17.1 (Ubuntu 17.1-1.pgdg20.04+1), server 12.21 (Ubuntu 12.21-1.pgdg20.04+1))
Type “help” for help.
postgres-# \c chirpstack_ns
psql (17.1 (Ubuntu 17.1-1.pgdg20.04+1), server 12.21 (Ubuntu 12.21-1.pgdg20.04+1))
You are now connected to database “chirpstack_ns” as user “postgres”.
chirpstack_ns-# \dt
List of relations
Schema | Name | Type | Owner
--------±--------------------------------±------±--------------
public | code_migration | table | chirpstack_ns
public | device | table | chirpstack_ns
public | device_activation | table | chirpstack_ns
public | device_multicast_group| table | chirpstack_ns
public | device_profile | table | chirpstack_ns
public | device_queue | table | chirpstack_ns
public | gateway | table | chirpstack_ns
public | gateway_board | table | chirpstack_ns
public | gateway_profile | table | chirpstack_ns
public | gateway_profile_extra_channel | table | chirpstack_ns
public | multicast_group | table | chirpstack_ns
public | multicast_queue | table | chirpstack_ns
public | routing_profile | table | chirpstack_ns
public | schema_migrations | table | chirpstack_ns
public | service_profile | table | chirpstack_ns
(15 rows)
On the off-chance that I set a different password, I checked /etc/chirpstack-network-server/chirpstack-network-server.toml and it doesn’t look like I deviated from setup instructions:
#fmg
#dsn=“postgres://localhost/chirpstack_ns_ns?sslmode=disable”
dsn=“postgres://chirpstack_ns:dbpassword@localhost/chirpstack_ns?sslmode=disable”
Is there some way for me to run a pg_dumpall from inside “sudo -u postgres psql”, which works?
I have no idea what to do next.