I would like to take back of my database of postgress.
now i am doing the command "pg_dumb " which written in a shell script and run it on command promt
How it will do with PHP?
Can i use that shell script in the PHP?
Is there any need to establish database connection when using pg_dump.
My shell script was like:
pg_dump -f /root/backupfolder/testfile.sql -h sourcedomain databasename

It didnt worked with shell_exec. why?
I tried with the code
<?
shell_exec('g_dump -f /root/backupfolder/testfile.sql -h sourcedomain databasename');
?>
what is the problem?
Is there any alternative solution to the problem??
give me a guidance
thanks in advance.

I would like to take back of my database of postgress.
now i am doing the command "pg_dumb " which written in a shell script and run it on command promt
How it will do with PHP?
Can i use that shell script in the PHP?
Is there any need to establish database connection when using pg_dump.
My shell script was like:
pg_dump -f /root/backupfolder/testfile.sql -h sourcedomain databasename

It didnt worked with shell_exec. why?
I tried with the code
<?
shell_exec('g_dump -f /root/backupfolder/testfile.sql -h sourcedomain databasename');
?>
what is the problem?
Is there any alternative solution to the problem??
give me a guidance
thanks in advance.

shell_exec('g_dump -f /root/backupfolder/testfile.sql -h sourcedomain databasename'); shell_exec('pg_dump -f /root/backupfolder/testfile.sql -h sourcedomain databasename'); did you forget the P?

Still the proble exists.
what is the reason I added the path of pg_dump ie usr/bin/pg_dump
But not working
thanks in advance

This article has been dead for over six months. Start a new discussion instead.