This question already has an answer here:

I have to do a backup of a (heavy) PostgreSQL database in Ubuntu Server and I want to make sure that I don't have any fails. The command is:

pg_dump database_name -h localhost -p port_number >> backup_file.sql

What do I have to add to this command to get an error report (if there is any error) in a specific location?

marked as duplicate by dessert command-line Apr 16 at 7:17

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Thanks @dessert,I think the problem was that i wasn't searching for the correct words for my problem. All the questions i found didn't answer mine. Thanks again. – SbManolo Apr 16 at 7:40
  • 2
    That’s exactly what the duplicate marking feature is for: Now your question serves as a signpost for others choosing your wording and redirects them to possible solutions. Thanks for asking! – dessert Apr 16 at 7:44
  • I didn't want to do anything with the cp command. It was only in case it helped to understand the question to someone who wasn't familiar with PostgresQL, since pg_dump (with its nuances of course) has similarities with cp. Sorry if the question causes some confusion. – SbManolo Apr 17 at 9:29