I have the following situation.
I have a PHP script that imports a CSV file and then updates the postgres database
Now I need to create a backup of the database before the importing occurs
The PHP files are running on one server and the postgres database on another server
I tried exec(pg_dump db_name -CdiOv > /tmp/db_name_backup.sql)
but don't think this will work since the db is on another server.
I'm not sure how to do this, I can right code in PHP performing a backup but that takles ages to run.
Any adwise will be appreciated