Unlogged tables are always included in dumps (pg_dump
) unless you explicitly specify the --no-unlogged-table-data
command line option.
Unlogged tables are also included in file-system level backups taken when the databases server is stopped after a clean shutdown.
Unlogged tables are never included in pg_basebackup
, streaming replication or WAL archiving backup and PITR. There is no option to include them, because to include them they'd have to be logged, and then they wouldn't be unlogged tables anymore.
In general, if you wish to back up unlogged tables, they probably should not be unlogged, because an unlogged table is erased completely if PostgreSQL or the server crashes or shuts down unexpectedly.