( 8 months ago )
I'm running a command to backup my DB:
(echo "`date`: START DUMPING"; db_dump.sh; echo "`date`: DONE DUMPING") >>db_dump.log
And in the db_dump.sh:
pg_dump -v --dbname=mydb | pigz | openssl enc -aes128 -k ssecret -out db_dump.gz.aes
How would I catch the informative output from pg_dump, pigz and openssl to db_dump.log?
Currently I'm thinking doing it:
pg_dump -v --dbname=mydb 2>>db_dump.log| pigz 2>>db_dump.log| openssl enc -aes128 -k ssecret -out db_dump.gz.aes 2>>db_dump.log
but that seems quite cumbersome...