From: Thomas Bednarz <pub@bednarz.ch>
To: pgsql-admin@postgresql.org
Subject: Re: calling pg_dump from perl
Date: Fri, 10 Jun 2011 07:13:53 +0200
Message-ID: <4DF1A811.2090202@bednarz.ch> (raw)
In-Reply-To: <ec9569b32dcf5f893370c314391a91a8@biglumber.com>
References: <ec9569b32dcf5f893370c314391a91a8@biglumber.com>
Hi Greg,
Yeah, thanks a lot. Works perfect. The correct perl code is:
my $backupargs = sprintf("-f \"%s\" -F p --clean -U postgres -h
localhost %s", $backupfile, $DBName);
Cheers
Thomas
Am 09.06.2011 22:16, schrieb Greg Sabino Mullane:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: RIPEMD160
>
>
>> COMMAND: E:\PostgreSQL\8.4SS\bin/pg_dump.exe -f
>> //nas-tb/DBBackups/PostgresDBBackup_TB-WS_misdwh_20110609151147.bak -F p
>> --clean -U postgres -h localhost misdwh
> ...
>> The interesting thing is, that it asks for a password for a database
>> named "TB". Only god knows where that comes from! The name of my
>> database is 'misdwh' and as can be seen on the command is passed as last
>> parameter.
> I would guess that TB is coming from the underscore in the filename.
> Try quoting the entire argument to -f like so:
>
> E:\PostgreSQL\8.4SS\bin/pg_dump.exe
> -f "//nas-tb/DBBackups/PostgresDBBackup_TB-WS_misdwh_20110609151147.bak"
> -F p --clean -U postgres -h localhost misdwh
>
> - --
> Greg Sabino Mullane greg@turnstep.com
> End Point Corporation http://www.endpoint.com/
> PGP Key: 0x14964AC8 201106091615
> http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
>
> -----BEGIN PGP SIGNATURE-----
>
> iEYEAREDAAYFAk3xKfEACgkQvJuQZxSWSsgyVACfQhuu35ITUETQ9aGT0muPrGb+
> fnsAnRrfEaMdBNcou9UVvln0EpxYfvHf
> =SNZ6
> -----END PGP SIGNATURE-----
>
>
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: pub@bednarz.ch
Subject: Re: calling pg_dump from perl
In-Reply-To: <4DF1A811.2090202@bednarz.ch>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox