I'm following this guide to do a replica server using postgres, I already made everything in a shell to automate it and seems fine, until I get to this command
pg_basebackup -h 192.168.1.103 -D /var/lib/postgresql/10/main -P -U replicationwhich I rewrote as
sudo -H -u postgres bash -c "pg_basebackup -h 192.168.1.103 -D /var/lib/postgresql/10/main/ -P -U replication"However right when my shell gets to run that command linux suddenly just keeps working... for around 3 minutes until it gives up, the shell resumes the script and ends the job, needless to say the command that gets stuck didn't get me the folder I was asking on from the primary server to the secondary server, the postgres log file shows me this:
pg_ctl: directory "/var/lib/postgresql/10/main" is not a database cluster directory
Running
pg_lsclustersgets me
Ver Cluster Port Status Owner Data directory Log file 10 main 5433 online postgres /var/lib/postgresql/10/main /var/log/postgresql/postgresql-10-main.logSo I'm clueless of what to do next since I can't find information about this error online
However I'm clueless of what to do next
2 Reset to default