Comments (5)
Hello Stéphane,
You're mentioning a migration of open-pryv.io right? Not an enterprise version?
Pierre-Mikael
from open-pryv.io.
Yes, exactly, not an enterprise version
from open-pryv.io.
Hello Stéphane,
Using a sample dataset produced with open-pryv.io 1.7.1
which can be found here we actually found 2 issues.
- the migration was not triggered as the version tag was not present.
- the migration of attachments was failing as the folder name changed from
attachment-files
toattachments
What is surprising from your initial post is that you are getting some result from "db.versions.find()" which we don't. This means that the issue you're facing might come from a different cause. Please check the following steps to migrate from v1.7.1 to v1.9.0 and let us know if it solves your problem.
If you're running a dockerized version, make a backup with docker exec -t open-pryv-mongo mongodump -d pryv-node -o /data/backup/
. The migration has to be done on a native set-up, but the migrated data will be usable by a docker installation.
- Make a dump a of v1.7.1 the database with
./var-pryv/mongodb-bin/bin/mongorestore <db_backup_destination>
- Prepare a fresh set-up of v1.9.0 and copy the following directories into v1.9.0
var-pryv
dir{v1.7.1}/var-pryv/attachement-files
=>{v1.9.0}/var-pryv/attachements
{v1.7.1}/var-pryv/users
=>{v1.9.0}/var-pryv/users
- Start mongodb for v1.9.0
- Restore data from the dump folder
./var-pryv/mongodb-bin/bin/mongorestore <db_backup_destination>
- Connect to mongodb with
{v1.9.0}/var-pryv/mongodb-bin/bin/mongosh
- From mongoshell type
use pryv-node
to connect to pryv.io db. - Then check the current version with:
db.versions.find({})
if empty add one with:db.versions.insertOne({ _id: '1.7.1', initialInstall: 0 })
- Restore data from the dump folder
- Run the migration script:
LOGS=info NODE_ENV=production ./components/api-server/bin/migrate --config {your configuration file}
At this stage you see the migration process and user correctly migrated should be listed at step 1.8.0 and attachments (if any) at step 1.9.0
Here is a sample output
... some warnings
2024-02-23 15:51:48 [info]: [api-server:migration-process] Connecting to storage...
2024-02-23 15:51:48 [info]: [api-server:migration-process] Storage connected.
2024-02-23 15:51:48 [info]: [api-server:migration-process] Starting migration...
2024-02-23 15:51:48 [info]: [api-server:migration-1.7.5] V1.7.1 => v1.7.5 Migration started
2024-02-23 15:51:48 [info]: [api-server:migration-1.7.5] V1.7.1 => v1.7.5 Migration finished
2024-02-23 15:51:48 [info]: [api-server:migration-1.8.0] V1.7.5 => v1.8.0 Migration started
2024-02-23 15:51:48 [info]: [api-server:migration-1.8.0] Migrating userId: clsyq5bum00001q9ylf5d2exx username: testuser
2024-02-23 15:51:48 [info]: [api-server:migration-1.8.0] Migrating password for userId: clsyq5bum00001q9ylf5d2exx
2024-02-23 15:51:48 [info]: [api-server:migration-1.8.0] migrating 5 fields for userId: clsyq5bum00001q9ylf5d2exx
2024-02-23 15:51:48 [info]: [api-server:migration-1.8.0] V1.7.5 => v1.8.0 Migration finished
2024-02-23 15:51:48 [info]: [api-server:migration-1.9.0] V1.9.0 => v1.9.0 Migration started
2024-02-23 15:51:48 [info]: [api-server:migration-1.9.0:attachments] Attachmend moved for userId: clsyq5bum00001q9ylf5d2exx to: /Users/perki/code/open-pryv.io/var-pryv/users/x/x/e/clsyq5bum00001q9ylf5d2exx/attachments
2024-02-23 15:51:48 [info]: [api-server:migration-1.9.0] V1.8.0 => v1.9.0 Migration finished
2024-02-23 15:51:48 [info]: [api-server:migration-process] Storage migration complete.
2024-02-23 15:51:48 [info]: [api-server:migration-process] Process exiting.
from open-pryv.io.
This is perfect: I could run the upgrade process with the instructions above.
Now users can login into a version 1.9 deployment.
The key point for us was to define a new version document if the collection was empty.
Thank you,
Stéphane
from open-pryv.io.
Thanks for the feedback,
We keep track of the issue solution on https://github.com/orgs/pryv/discussions/3
from open-pryv.io.
Related Issues (14)
- Socket.io connection path does not follow Documentation HOT 1
- Incorrect status code for existing items HOT 1
- Partially missing error explanation in user registration response HOT 3
- Cannot login with created user's credentials HOT 2
- Ability to specify configuration via environment variables using docker HOT 5
- Ability to use Pryv in tests HOT 2
- Docker version certificates expired HOT 6
- Pryv docker cannot start HOT 13
- Error when starting version 1.7.1-6-open on a mongo 4.4 version HOT 1
- Error on connection page HOT 2
- Error setting up Pryv with FerretDB HOT 9
- open-pryv.io / Docker / Windows HOT 9
- Issue with creating access with 'create-only' level. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from open-pryv.io.