Export PostgreSQL database with php -


hello i'm trying export specific postgresql database using php laravel 5.

i thinking in using exec , pg_dump this

$command = 'pg_dump -u ' . env('db_username') . ' -h ' .env('db_host') . ' -p ' . env('db_port') . ' -f ' . $file . ' -d ' . env('db_database'); exec($command); 

but fails because i'm not able de write password when asked... there way make dump of postgresql database using exec?. or there uis better way php?.

thanks


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -