Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

Migrate old data #8

Open
rushsteve1 opened this issue Jan 17, 2021 · 3 comments
Open

Migrate old data #8

rushsteve1 opened this issue Jan 17, 2021 · 3 comments
Assignees
Labels
database Deals with database definition or maintenance

Comments

@rushsteve1
Copy link
Contributor

The old versions of Observatory and the WIki need to be migrated to the new database as soon as we have a new production DB running.

Old data can be found on:

  • The current rcos.io MongoDB instance
  • The old Observatory-new server has the SQLite database it used and DokuWiki files
  • Google Sheets documents
  • And possibly elsewhere?
@rushsteve1 rushsteve1 added the database Deals with database definition or maintenance label Jan 17, 2021
@rushsteve1 rushsteve1 self-assigned this Jan 17, 2021
@Apexal
Copy link
Member

Apexal commented Jan 17, 2021

Postgrest's bulk insert routes will come in handy here.

@rushsteve1
Copy link
Contributor Author

Probably the easiest and best way to do this would be to transfer the old DO Droplet to the new RCOS account, then pull the data off of it. This would also preserve a backup of the old server in case we ever need it.

Actually migrating the data might be a bit of a pain though. We're probably going to have to use mongoexport or mongodump to dump the data to JSON (or CSV?), and then edit it to match the new schema before importing it to Postgres.
Something tells me this is going to be harder than it seems though.

@rushsteve1
Copy link
Contributor Author

Attacked is a ZIP containing a script to dump files from BSON to JSON, and then a set of jq filters to transform the JSON to a more compatible schema.

data-transforms.zip

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
database Deals with database definition or maintenance
Projects
None yet
Development

No branches or pull requests

2 participants