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?

i changed to pg_dump.
but still face problem.

Is this your localhost? Window or Linux?

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.