# Percona backup configuration for MongoDB

**URL:** <https://forums.percona.com/t/percona-backup-configuration-for-mongodb/34051>\
**Category:** Percona Backup for MongoDB\
**Created:** [October 1, 2024, 11:47am UTC](https://forums.percona.com/t/percona-backup-configuration-for-mongodb/34051 "2024-10-01T11:47:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wali\_Hasan](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/wali_hasan/32/14587_2.png) [@Wali\_Hasan](https://forums.percona.com/u/Wali_Hasan)\
**Post date:** [October 1, 2024, 11:47am UTC](https://forums.percona.com/t/percona-backup-configuration-for-mongodb/34051/1 "2024-10-01T11:47:40Z")

</div>

Hello,  
I’ve a self-managed 3node MongoDB cluster configured on GCE instances. I’m trying to setup incremental backup for this database,i’ve installed the pbm agents on my instances & also specified the storage location. I’m triggering a kubernetes cronjob to run backup jobs.  
The backup part is working as expected for me,but i have one question…  
Suppose,if one database/collection gets corrupted and i wish to restore only that particular database/collection,is there a way to restore only that db/collection in incremental db backup type?? because i tried to restore using "pbm restore 2024-10-01T11:21:03Z --ns="stg\_gsdin\_adit.\* " command,but it gives me this error “Error: --ns flag is only allowed for logical restore” …Does this mean that in incremental backup i cannot restore only a certain database/collection?? or is there a way to achieve the same??  
Please help on this.

Thanks.

---

<div class="post-metadata">

**Author:** ![Vinodh\_Krishnaswamy](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/vinodh_krishnaswamy/32/46_2.png) [@Vinodh\_Krishnaswamy](https://forums.percona.com/u/Vinodh_Krishnaswamy)\
**Post date:** [October 1, 2024, 12:34pm UTC](https://forums.percona.com/t/percona-backup-configuration-for-mongodb/34051/2 "2024-10-01T12:34:39Z")

</div>

Hey Wali\_Hasan,  
Yes, you can use only the logical backup to restore a particular namespace - selective restore. You can check here for its limitations - [Selective backup and restore - Percona Backup for MongoDB](https://docs.percona.com/percona-backup-mongodb/features/selective-backup.html#known-limitations-of-selective-backups-and-restores).  
With incremental backup, you have to follow some workarounds to achieve what you need:

1. setup a new environment and restore the desired incremental backup into it
2. Backup the collection/db - NS that you need to restore using mongodump tool
3. Then restore (mongorestore) that particular backup in the source with --drop option

Regards,  
Vinodh Guruji

---

<div class="post-metadata">

**Author:** ![Wali\_Hasan](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/wali_hasan/32/14587_2.png) [@Wali\_Hasan](https://forums.percona.com/u/Wali_Hasan)\
**Post date:** [October 1, 2024, 2:45pm UTC](https://forums.percona.com/t/percona-backup-configuration-for-mongodb/34051/3 "2024-10-01T14:45:29Z")

</div>

Hi @Vinodh_Krishnaswamy,  
I do not wish to use mongodump and mongorestore cli tools,this would then defeat the whole purpose of using pbm for backup & restore.  
So as per the documentation,it means that in incremental backups only full db restore is possible,hmmm.
