Part-DB / Part-DB-server

Part-DB is an Open source inventory management system for your electronic components
https://docs.part-db.de/
GNU Affero General Public License v3.0
880 stars 96 forks source link

Missing child elements after Database restore #684

Closed AlexD0302 closed 5 days ago

AlexD0302 commented 2 weeks ago

Hello, is it possible that the described recovery method does not work? Let me describe my procedure:

I have created an SQL dump on the old server (this is a Raspberry Pi; mysql -u root -p < backup.sql)

Then I installed the following on the new server:

Finally, I executed the backup with ‘mysql -u root -p < backup.sql’.

Now it sometimes happens that I get the following error, for example when I want to edit or delete components:

Invalid resource provided: ‘/var/www/partdb/translations/messages.zh.xlf’; Errors: [ERROR 1871] Element ‘{urn:oasis:names:tc:xliff:document:2.0}file’: Missing chil d element(s). Expected is one of ( {urn:oasis:names:tc:xliff:document:2.0}skeleton, ##other{urn:oasis:names:tc:xliff:document:2.0}*, {urn:oasis:names:tc:xliff:docu ment:2.0}notes, {urn:oasis:names:tc:xliff:document:2.0}unit, {urn:oasis:names:tc:xliff:document:2.0}group ). (in /var/www/partdb/ - line 3, column 0)

Is it problematic as I am using Debian 12 on the new server?

jbtronics commented 2 weeks ago

This is most likely not an backup/restore problem, but an problem caused by an somehow broken, translation file (it says that the Chinese translation is somewhat broken). That is untouched by the restore process, so it would probably also occur with a fresh database.

You can probably fix it by copying the translations\messages.zh.xlf from GitHub into your Part-DB instance. Probably something went wrong with the copying, when you installed Part-DB (but then it's possible that this affects more files)

AlexD0302 commented 2 weeks ago

Thank you for your answer. I was able to solve the problem but I don't know how it came about. Somehow my old server had been updated but obviously not completely....new update to 1.13.3 solved the problem and now everything works fine.