Been trying to find the answer to this, but the answers seem to focus on a "push" mentality rather than "pull". Like this:
Copying PostgreSQL database to another server
I have a local VM dev machine. Redhat REHEL. I also have a remote environment, let's name it "integration". I have SSH access to this environment and am in the Sudoers group on the remote server.
What I want is to have a way on my local VM to pull down a complete copy of the database on integration, and push it into a waiting (empty) db. Let's call that DB "int_backup".
This doesn't have to be one command. Happy to bash script multiple commands. But the key here is integration is unaware of my local VM and cannot access it. So the task must be done from the VM side of things.
All suggestions welcome. But installing software on integration is not a likely realistic solution.