-bash-4.2$ pg_restore -v -j4 -c -C -d postgres /var/lib/pgsql/NAME_OF _YOUR DIRECTORY_DUMP_FILE >& corpus_restore_$(date '+%Y-%m-%d_%H%M%S').log The second command: will restore/refresh corpus database with CAST and owner as corpus on the new serverFor example: -bash-4.2$ pg_restore -v -j4 -c -C -d postgres /var/lib/pgsql/corpus_2018-01-22_063713.dir >& corpus_restore_$(date '+%Y-%m-%d_%H%M%S').log
CODE