Resync pbmBackups when storage location changes in config
General
Escalation
General
Escalation
Description
When the storage destination is changed (included being initialized for the first time) the available backups change. E.g. if you change from your Minio localhost test at [127.0.0.1:9000 testbucket1, some_dir] to using, say, AWS S3 at [region xxx-yyy, mongodb_prod_bk_bucket1, some_dir_prefix] then the backups available to PBM stop being those on the Minio and are the ones in that AWS S3 location instead.
After the storage location changes the list of backups in admin.pbmBackups should be resynced to match those in the new location. If there are none, then yes delete all.
Regarding old pbmBackup documents from the earlier storage location: I think we should drop them for now. Keeping them for archival purposes is desirable, and maybe putting them in pbmLog is sufficient, but that is a different ticket.
Environment
None
Smart Checklist
Activity
Show:
andrew.pogrebnoi December 18, 2019 at 7:54 PM
Also added the `pbm config --resync` flag to enforce resync. Resync from the filesystem store also supported.
Backups list is fully synchronized with the [remote] store. Meaning if there is nothing there - `pbm list` is empty.
All the existing backups' meta is copied to the `admin.pbmBackups.old` collection beforehand. In format
When the storage destination is changed (included being initialized for the first time) the available backups change. E.g. if you change from your Minio localhost test at [127.0.0.1:9000 testbucket1, some_dir] to using, say, AWS S3 at [region xxx-yyy, mongodb_prod_bk_bucket1, some_dir_prefix] then the backups available to PBM stop being those on the Minio and are the ones in that AWS S3 location instead.
After the storage location changes the list of backups in admin.pbmBackups should be resynced to match those in the new location. If there are none, then yes delete all.
Regarding old pbmBackup documents from the earlier storage location: I think we should drop them for now. Keeping them for archival purposes is desirable, and maybe putting them in pbmLog is sufficient, but that is a different ticket.