pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: pg_dump why no indicator of completion
Date: Tue, 2 May 2023 02:41:47 -0500
Message-ID: <aed207be-9bc1-a4c7-99f7-25fc43703546@gmail.com> (raw)
In-Reply-To: <CAKhLO5h0iaJFrESO2yUBwKYUgqWhMocRQyxejEXOdZ_9Jo7GeA@mail.gmail.com>
References: <CAGA3vBugp4Ce8ZbOfntb8HjCvo5QtX1hhAHj3iuCMZdzSTo4dg@mail.gmail.com>
	<CAKFQuwaEckQ5T10RwLsAx5giGtz9B4RsJg=U6WbZBTGAPmKSBA@mail.gmail.com>
	<6EF026A5-5CEC-48AB-B27E-C225DAE6E10A@elevated-dev.com>
	<491f094b-93f9-6a7d-1846-901aa583171c@gmail.com>
	<CAKhLO5iRHh6JoxBJyMV8RkEYWfjiE_qBhiUu1YTkLPAhjWwpuQ@mail.gmail.com>
	<CAGA3vBuf5sj87zrjZMAnjESx9abDz4UmPdj+2dYRkyy-jUCr8Q@mail.gmail.com>
	<525021224.1417508.1682996739307@office.mailbox.org>
	<CAKhLO5h0iaJFrESO2yUBwKYUgqWhMocRQyxejEXOdZ_9Jo7GeA@mail.gmail.com>

On 5/1/23 22:21, Tim wrote:
>  > After reading the responses in this thread I've adjusted it to capture 
> the exit status
>
> Just so I'm not a complete troll, heres your example which also appends a 
> success/fail message :)
>
> nohup $(pg_dump ${connection_details} > something.log 2>&1 && echo "pgdump 
> succeded" >> something.log || echo "pgdump failed" something.log) &

Out of curiosity, why this:
     > something.log 2>&1
instead of that?
     &> something.log

Yes, "&>" is a bashism, but so what?

-- 
Born in Arizona, moved to Babylonia.

view thread (37+ messages)  latest in thread

Message-ID: <aed207be-9bc1-a4c7-99f7-25fc43703546@gmail.com>
Permalink:  ../aed207be-9bc1-a4c7-99f7-25fc43703546@gmail.com/
Also on:    postgresql.org/message-id/aed207be-9bc1-a4c7-99f7-25fc43703546@gmail.com

 · 

reply

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: ronljohnsonjr@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: pg_dump why no indicator of completion
  In-Reply-To: <aed207be-9bc1-a4c7-99f7-25fc43703546@gmail.com>

* 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