mirror of
https://github.com/wekan/wekan.git
synced 2026-11-25 10:48:06 -05:00
From an upgrade report by email. The admin upgraded 6.09 -> 10.85 exactly by the documented route - dump, move /var/snap/wekan/common aside, refresh, restore - and it worked: the boards were back. Then, to get their attachments, they undid step 3 the way it reads: cp -pR /root/common/* /var/snap/wekan/common/ Their log, seconds later: mongodb-control: line 489: 351018 Aborted ... $SNAP/bin/mongod --dbpath=... snap.wekan.mongodb.service: Main process exited, code=exited, status=134/n/a "After that, Wekan was still running, but all the boards were missing." Everything beside files/ in that directory is the raw database - *.wt, WiredTiger*, _mdb_catalog.wt, sizeStorer.wt, storage.bson, mongod.lock, journal/ - and copying it over a RUNNING mongod replaces the files it has open underneath it. mongod aborts, and what comes back up is the 6.09 database it cannot read. The documentation is where this is decided, because the mistake is made before any code of ours runs. Step 6 already said to copy back only `files`; what it did not say is what the obvious inversion of step 3 costs, so it says it now, in the step itself: the exact wrong command, which files those are, what the failure looks like in `snap logs wekan.mongodb` so somebody who has already done it recognises their own log, and that the whole directory IS put back in one place - the "going back to 6.09" procedure - onto a STOPPED snap with the current contents removed first, which is a different operation. And mongodb-control now recognises the abort it produces. Exit 134 gets a case of its own beside exit 132 (SIGILL/AVX): SIGABRT, the data directory changed underneath a running mongod, which files may and may not be copied back, and the one way out, `snap run wekan.database-restore <archive>`. Before this the whole story in the log was the word "Aborted". The same report also had a board with attachments that loads forever after a restore. That one is not diagnosed here - the attached logs are mongod startup only, with no errors in them - so it goes to TODO Later rather than being guessed at. tests/snapCopyBackDestroysDatabase.test.cjs pins both halves, including that the warning sits in the step where the mistake is made and above the procedure it must not be confused with. Verified by running the new suite and the whole node suite (376 suites, 0 failed). Thanks to xet7 !