Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG - Make a backup and clear old collections from Mongo prod #95

Open
emrojo opened this issue Aug 5, 2020 · 4 comments
Open

BUG - Make a backup and clear old collections from Mongo prod #95

emrojo opened this issue Aug 5, 2020 · 4 comments
Assignees
Labels
Bug Something isn't working

Comments

@emrojo
Copy link
Contributor

emrojo commented Aug 5, 2020

Describe the bug
Make a backup from old collections and remove them from the database.

RT Ticket Number
If applicable

To Reproduce
Steps to reproduce the behaviour:

  1. Go to page '...'
  2. Click on button '...'
  3. See error

Expected behaviour
What was expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • Windows or Mac?
  • Browser Chrome, Firefox, Safari or other?
  • Browser version (use 'About' to look up)?

Additional context
Add any other context about the problem here.

@emrojo emrojo added the Bug Something isn't working label Aug 5, 2020
@neilsycamore
Copy link

Which collections are going to be removed?

@andrewsparkes
Copy link
Member

andrewsparkes commented Aug 18, 2020

@neilsycamore
We have adjusted the process so the 'samples' collection is persisted from day to day rather than creating a new one.
Katy has created a migration that takes the timestamps from those old collection sample rows and puts them in the persisted samples collection, so we know when the sample rows were originally created.
So once that is done we will be able to remove all the old sample collections (as we're out of space and they wouldn't be needed any more). The DBAs back up the database anyway.
Does that cause you any issues??

@neilsycamore
Copy link

I have a collection that I use
db.createView("ditinctNegPlateBarcode3", "samples", [{ $match : { Result : "Negative" } }])
Can I keep this?
It's actually misnamed but I created it way back with Phillip and don't now how to rename it but it's a list of -ve samples NOT grouped by plate barcode.
I need this to generate a SSR report which is run every Monday. Hoping this will be surpassed eventually by ongoing reporting.. but not yet

@andrewsparkes
Copy link
Member

andrewsparkes commented Aug 18, 2020

@neilsycamore
Think that should be fine as the 'samples' collection is still called 'samples'.
We've added some extra columns but not renamed any existing ones.
What used to happen is each day the samples collection would get renamed with the date, and a new, latest version 'samples' would be created with everything in it from before plus content from any new files. It's only those old backups we are proposing to remove.
It's possible you might get a slightly lower number than before, there was some insertion of incomplete data that shouldn't have been happening before, and some duplications, which we are filtering out and reporting as errors now.

@emrojo emrojo self-assigned this Aug 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants