# PBM-INIT File safe for removal?

**URL:** <https://forums.percona.com/t/pbm-init-file-safe-for-removal/35763>\
**Category:** Percona Backup for MongoDB\
**Created:** [December 20, 2024, 9:10pm UTC](https://forums.percona.com/t/pbm-init-file-safe-for-removal/35763 "2024-12-20T21:10:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TimSandberg](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/timsandberg/32/3322_2.png) [@TimSandberg](https://forums.percona.com/u/TimSandberg)\
**Post date:** [December 20, 2024, 9:10pm UTC](https://forums.percona.com/t/pbm-init-file-safe-for-removal/35763/1 "2024-12-20T21:10:05Z")

</div>

Can the .pbm-init file in my S3 bucket be safely deleted? I’m trying to do my restore testing and it appears this file is causing the --force-sync command to fail on my restore cluster.

---

<div class="post-metadata">

**Author:** ![Ivan\_Groenewold](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ivan_groenewold/32/6299_2.png) [@Ivan\_Groenewold](https://forums.percona.com/u/Ivan_Groenewold)\
**Post date:** [December 23, 2024, 11:56am UTC](https://forums.percona.com/t/pbm-init-file-safe-for-removal/35763/2 "2024-12-23T11:56:20Z")

</div>

Hi, if you are referring to the pbm.init file, it usually contains just the pbm version used. Why do you suspect it is causing problems? what is the error you are getting?

---

<div class="post-metadata">

**Author:** ![TimSandberg](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/timsandberg/32/3322_2.png) [@TimSandberg](https://forums.percona.com/u/TimSandberg)\
**Post date:** [December 26, 2024, 7:03pm UTC](https://forums.percona.com/t/pbm-init-file-safe-for-removal/35763/3 "2024-12-26T19:03:41Z")

</div>

The issue was the file have been sent to Deep Archive in S3, so the restore test I was attempting was trying to overwrite the file and couldn’t. After your response, I just deleted the archived file and let the restore process write a new file. Thanks for your response.

---

<div class="post-metadata">

**Author:** ![Nathan\_Neulinger](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/nathan_neulinger/32/176_2.png) [@Nathan\_Neulinger](https://forums.percona.com/u/Nathan_Neulinger)\
**Post date:** [January 18, 2025, 9:17pm UTC](https://forums.percona.com/t/pbm-init-file-safe-for-removal/35763/4 "2025-01-18T21:17:53Z")

</div>

I ran into similar issue when trying to use a read-only IAM profile, thread here for reference. In my case, giving the profile access to only write to .pbm.init was sufficient to get functional.

> [@How to restore from a read-only S3 bucket?](https://forums.percona.com/t/how-to-restore-from-a-read-only-s3-bucket/36206):
>
> I’m trying to restore to an secondary test cluster (with identical replset name) for the purposes of validating a backup. However, the first thing pbm tries to do with a force-resync is to rewrite .pbm.init in the repository, which it cannot do because it doesn’t have permissions. I’m going to try doing a very limited IAM role that would allow it to delete/upload JUST that one file, but that seems rather hackish. Is there a proper way to be able to restore from a protected path that I don’t hav…
