Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
8.9
-
None
Description
Reproduction Steps: # Create a collection 'foo',
- Insert small number of documents (say 10) into collection 'foo'
- Backup collection 'foo' using collections API (/admin/collections?action=BACKUP), this should result in creation of backupId 0
- Backup collection 'foo' again using collections API (/admin/collections?action=BACKUP), this should result in creation of backupId 1
- Delete backupId 0 for collection 'foo' (/admin/collections?action=DELETEBACKUP?backupId=0)
- Run delete backup for collection 'foo' again, this time with 'purgeUnused=true' (/admin/collections?action=DELETEBACKUP?purgeUnused=true)
- Restore from backupId 1 which still exists to collection 'bar' (/admin/collections?action=RESTORE)
Expected Result: # Restored collection 'bar' has 10 documents in it
Actual Result: # Restored collection 'bar' has 0 documents in it
We found in our testing that when purge is used it incorrectly deletes all backup data instead of just the unused data as it supposed to.