Обсуждение: Database backup to network folder

Поиск
Список
Период
Сортировка

Database backup to network folder

От
kalyan kumar
Дата:
Hi,

I am using Postgre SQL 8.3, where I want to backup my entire database. For the same I am using pg_dump.exe. I am able to take the backup of my database in to my local machine. If I want to take the backup into network folder, how to pass "-f" parameter to pg_dump.exe. I am using SMB to implement file copy to network folder.

Thanks in advance.

Regards
Kalyan Kumar Sai

Re: Database backup to network folder

От
Raymond O'Donnell
Дата:
On 01/08/2011 06:35, kalyan kumar wrote:
> Hi,
>
> I am using Postgre SQL 8.3, where I want to backup my entire database.
> For the same I am using pg_dump.exe. I am able to take the backup of my
> database in to my local machine. If I want to take the backup into
> network folder, how to pass "-f" parameter to pg_dump.exe. I am using
> SMB to implement file copy to network folder.

From the above, it sounds as if you're on Windows.... if so, it might be
easiest to map a drive letter to the network share, and use that in the
-f parameter.

Ray.


--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie

Re: Database backup to network folder

От
Craig Ringer
Дата:
On 1/08/2011 1:35 PM, kalyan kumar wrote:
> Hi,
>
> I am using Postgre SQL 8.3, where I want to backup my entire database.
> For the same I am using pg_dump.exe. I am able to take the backup of my
> database in to my local machine. If I want to take the backup into
> network folder, how to pass "-f" parameter to pg_dump.exe. I am using
> SMB to implement file copy to network folder.

Have you tried using a UNC path, like you would for anything else?
pg_dump shouldn't have to care where the output is being saved.

pg_dump -f \\servername\sharename\foldernames\dumpfile.sql dbname

I haven't tested this, but there's no reason it shouldn't work, as UNC
paths are resolved at the file system level and apps shouldn't notice them.

--
Craig Ringer

POST Newspapers
276 Onslow Rd, Shenton Park
Ph: 08 9381 3088     Fax: 08 9388 2258
ABN: 50 008 917 717
http://www.postnewspapers.com.au/