I have PostgreSql running on my pc.
I want to backup database using pg_dump.
I can backup the database to a specific file with a winform application.
string pgdump = @"c:\Program Files\PostgreSQL\13\bin\pg_dump.exe";
string arguments = @"-U postgres -Fc -d dbname -v -f c:\backup\file.backup";
Process proc = new Process { StartInfo = new ProcessStartInfo(pgdump, arguments) };
proc.Start();
proc.WaitForExit();
But when i want to do the same thing in a asp.net mvc project, just changing the directory for the file to a directory which i have access
@" -U postgres -Fc -d dbname -v -f C:\inetpub\wwwroot\ReportDir\file.backup
I can see pg_dump starts on task manager and also it creates the specific file with 0Kb but does not continue and finish backing up.
I think that on web project the user doesn't have the right to access the database, but don't know how to fix it?
How can I solve the access problem? Thanks
İlker