From 94a11ff291e789c1074dc495f5da77fd14c75903 Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Thu, 21 Apr 2022 17:56:29 -0400 Subject: [PATCH] docs: add repo recovery documentation Signed-off-by: Eric Callahan --- docs/installation.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/docs/installation.md b/docs/installation.md index 7fecce6..fee9be5 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -280,6 +280,43 @@ Retrieve the API Key via the browser from a trusted client: {"result": "8ce6ae5d354a4365812b83140ed62e4b"} +### Recovering a broken repo + +Currently Moonraker is deployed using `git`. Without going into the gritty +details,`git` is effectively a file system, and as such is subject to +file system corruption in the event of a loss of power, bad sdcard, etc. +If this occurs, updates using the `[update_manager]` may fail. In most +cases Moonraker provides an automated method to recover, however in some +edge cases this is not possible and the user will need to do so manually. +This requires that you `ssh` into your machine. The example below assumes +the following: + +- You are using a Raspberry Pi +- Moonraker and Klipper are installed at the default locations in the `home` + directory +- Both Moonraker and Klipper have been corrupted and need to be restored + +The following commands may be used to restore Moonraker: + +```shell +cd ~ +rm -rf moonraker +git clone https://github.com/Arksine/moonraker.git +cd moonraker/scripts +./install-moonraker.sh +./set-policykit-rules.sh +sudo systemctl restart moonraker +``` + +And for Klipper: + +```shell +cd ~ +rm -rf klipper +git clone https://github.com/Klipper3d/klipper.git +sudo systemctl restart klipper +``` + ### Additional Notes - Make sure that Moonraker and Klipper both have read and write access to the