You can use the PostgreSQL pg_dump command to do a full online backup of both Embedded and External database.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:
For more information, see pg_dump.