fbexport icon indicating copy to clipboard operation
fbexport copied to clipboard

Add silent mode

Open DJ-Andrey-sXe opened this issue 5 years ago • 1 comments

On Export you write this to STRERR:

Connecting to: 'LOCALHOST' as 'SYSDBA'...Connected.
Creating and starting transaction...Done.
Create statement...Done.
Prepare statement...Done.
Exec statement...Done.
Exporting data as INSERT statements...

Start   : Sat Oct  5 12:17:46 2019
End     : Sat Oct  5 12:17:47 2019
Elapsed : 1 seconds.
*** rows exported to ***.

Transaction commited.
  1. Add some cmdline option to suppress these lines (leave only real errors if they are). This is the feature request.
  2. It's not an errors (why to STRERR?)

DJ-Andrey-sXe avatar Oct 05 '19 08:10 DJ-Andrey-sXe

Current workaround:

./fbexport -Si -C 100000 -D ***.gdb -P *** -F transactions_tmp.sql -Q \
$"select..." 2>&1 \
  | grep -v \
  -e '\w\.\.\.Done.$' \
  -e '^Exporting data as INSERT statements\.\.\.$' \
  -e '^Connecting to: ' \
  -e '^Elapsed : ' \
  -e '^Start   : ' \
  -e '^End     : ' \
  -e '^$' \
  -e '^.\+ rows exported to .\+\.$' \
  -e '^Transaction commited\.$'

Now it's usable in crontab.

DJ-Andrey-sXe avatar Oct 05 '19 08:10 DJ-Andrey-sXe