Pcornel
Technology Comparisons

Logical vs Physical Database Backup

Compare exporting database contents with copying database files.

DimensionLogical backupPhysical backupWhat it means in practice
What is copiedSQL statements or an archive of rows and schema.Data files and logs at block level.Physical backups include indexes as built; logical restores rebuild them.
Restore speedSlow for large databases.Fast; close to file copy speed.Measure restore time against the recovery objective.
PortabilityWorks across versions and platforms.Same major version and platform.Use logical dumps for upgrades and migrations.
Point-in-time recoveryNot by itself.Yes, combined with WAL, binlog or log backups.PITR needs a physical base backup in most engines.
GranularitySingle tables or schemas easily.Whole cluster or instance.Restore a single table from a physical backup by restoring elsewhere and exporting it.
Toolspg_dump, mysqldump, bcp/BACPAC.pg_basebackup, Mariabackup, BACKUP DATABASE, storage snapshots.Test both kinds with real restores.

← All comparisons

Confirmation

Confirm action

Continue?