Error 403: Write access to namespace 'history' is forbidden #492
-
I would like to restore my old print history after I recently created a clean installation of MainsailOS as my previous installation was corrupted (couldn't setup hardware PWM). Because I already did some prints on the new installation of which I'd like to keep the history, too, I can't simply copy and paste the Moonraker database files ( I decided to retrieve the old history in JSON format via the Moonraker Client API to merge it with the new history by going to
After installing npm to install wscat, I established a connection to the Moonraker Client API using wscat in PowerShell 5.1:
Getting constant Moonraker process statistic updates, I decided to pipe the output of wscat through a filter to hide them:
So far so good, but when I try to add a database item to the (empty) history namespace like so:
... this error is thrown:
What's the problem here? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The "problem" is, that the However, using
There are probably other ways to achieve this and maybe some more correct ones, too, but this worked fine for me and hasn't caused me any issues yet. Ideally, if you do a new installation of e.g. MainsailOS, just copy the Moonraker database files ( |
Beta Was this translation helpful? Give feedback.
The "problem" is, that the
history
namespace is protected.There was an
enable_database_debug
option available as part of the[database]
section of themoonraker.config
which disabled the protection, but that has since been removed.However, using
git checkout <branch>
it is possible to revert to a version where theenable_database_debug
option is still available:CREATE A BACKUP!
I used VirtualBox to create an Ubuntu VM in which I created a drive image of the SD card, but there are other ways to achieve this, too.
Follow the steps above to retrieve the current history in JSON format and merge it with your old history.
Once that is done, remove the entire current history (I did so in…