You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 to attachments
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
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 })
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
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This discussion to keep the resolution of issues found in migration open-pryv.io 1.7.1 to 1.9.0
Using a sample dataset produced with
open-pryv.io 1.7.1
which can be found here we actually found 2 issues.attachment-files
toattachments
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../var-pryv/mongodb-bin/bin/mongorestore <db_backup_destination>
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
./var-pryv/mongodb-bin/bin/mongorestore <db_backup_destination>
{v1.9.0}/var-pryv/mongodb-bin/bin/mongosh
use pryv-node
to connect to pryv.io db.db.versions.find({})
if empty add one with:db.versions.insertOne({ _id: '1.7.1', initialInstall: 0 })
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
Beta Was this translation helpful? Give feedback.
All reactions