Skip to content

Conversation

@boris-ilijic
Copy link
Member

@boris-ilijic boris-ilijic commented Oct 25, 2024

PR for https://perconadev.atlassian.net/browse/PBM-1421

PR allows restore and cloning single collection from the backup data into arbitrary (new) collection within database:

pbm restore 2024-10-27T11:23:30Z --ns-from=db.c --ns-to=db.c2

In the example above, after cloning collection db.c, newly created collection db.c2 will have:

  • the same data as collection db.c
  • the same indexes as db.c

They are used for cloning existing collection from the backup (--ns-from)
into the new collection with the different name (--ns-to).
Following settings are applied:
- mongorestore has additional options: ns include for target collection;
  preserved UUID and dropping collections should be turned off for
  cloning collection
- pbm restore should be run in selective mode, and selected ns should be
  cloning collection
@boris-ilijic boris-ilijic force-pushed the PBM-1421-restore-cloned-collection branch from faa1ca5 to fee14bc Compare October 28, 2024 11:47
@boris-ilijic boris-ilijic marked this pull request as ready for review October 29, 2024 10:48
@boris-ilijic boris-ilijic requested a review from defbin as a code owner October 29, 2024 10:48
@boris-ilijic boris-ilijic force-pushed the PBM-1421-restore-cloned-collection branch from 3dd6963 to 6b5e9ac Compare October 29, 2024 11:50
@boris-ilijic boris-ilijic merged commit 2a6b65b into dev Oct 30, 2024
20 of 22 checks passed
@boris-ilijic boris-ilijic deleted the PBM-1421-restore-cloned-collection branch October 30, 2024 12:04
@defbin defbin added this to the next milestone Oct 31, 2024
@defbin defbin added the feature new feature label Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants