Hi,
Let’s say I have a standalone, simplest Mongodb, no replica etc. on cheap 1gb/2gb ram VPS.
Collection size is about 1gb. simple app.
is hot backup from Percona MongoDB db.runCommand({createBackup: 1, backupDir: "<backup_data_path>"})
enough?
Because it seems setting up PBM would be an overkill in this scenario, right?
Hi @conake8659 ,
Welcome to Percona Community!!
To answer your question in one liner, yes you can use Hot Backup method for your simple app.
But it will not provide you PITR (Point-in-time-recovery) in case of any disaster happened and important point to consider in production environment. PBM provides this as one of the feature as well.
So, depending on the priority, so you chose the backup menthod.
Regards,
Parag
PBM does not support a standalone node. At least replset deployment is needed because of oplog.
Shortly speaking, backup is reading and saving into a file(s) each document for each collection. During the start and end of the backup process, there could be changes in any document that you have already read and saved. PBM saves oplog for the whole backup period to ensure data consistency at the “restore time”/"end of the backup.
This is a limitation of underly WiredTiger, which has a lock at the document level, not a collection or database. MongoDB uses transactions to provide ACID across multiple docs/collections, but they are logical and require an oplog (replset).