Backup and restore types¶
As of version 1.7.0, Percona Backup for MongoDB supports physical and logical backups and restores. This document describes each type.
Important
Physical backups and restores is the technical preview feature [1]. Before using them in production, we recommend that you test restoring from physical backups in your environment, and also use an alternative backup method for redundancy.
Physical backup is copying of physical files from the Percona Server for MongoDB dbPath
data directory to the remote backup storage. These files include data files, journal, index files, etc. Physical restore is the reverse process: pbm-agents
shut down the mongod
nodes, clean up the dbPath
data directory and copy the physical files from the storage to it.
During physical backups and restores, pbm-agents
don’t connect to the database and don’t read the data. This significantly reduces the backup / restore time compared to logical ones and is the recommended backup method for big (multi-terabyte) databases.
Physical backups and restores are available for Percona Server for MongoDB starting from versions 4.2.15-16, 4.4.6-8, 5.0 and higher. Since physical backups heavily rely on the WiredTiger $backupCursor functionality, they are available only for WiredTiger storage engine.
See also
Percona Blog:
Logical backup is the copying of the actual database data. A pbm-agent
connects to the database, retrieves the data and writes it to the remote backup storage. During the restore, the reverse process occurs: the pbm-agent
retrieves the backup data from the storage and inserts it to the dbPath
data directory.
Logical backups allow for point in time recovery
Type |
Advantages |
Disadvantages |
---|---|---|
Physical |
|
|
Logical |
|
|