How can I manually restore a backup created with the Backup & Restore plugin?

backup

#1

If you want to manually restore a backup created by the Backup & Restore plugin bundled with OctoPrint 1.3.10 or later, you have two options:

Through the command line

:warning: This is not supported under Windows

  1. Copy the backup to the OctoPrint instance you want to restore it on, e.g. through SCP
  2. Open a command line on the system running OctoPrint (e.g. through SSH)
  3. Shutdown the OctoPrint server (OctoPi: sudo service octoprint stop)
  4. Execute /path/to/octoprint plugins backup:restore /path/to/backup.zip (OctoPi: ~/oprint/bin/octoprint plugins backup:restore ~/backup.zip). Make sure that you provide the full path to the backup file, otherwise it won't be found.
  5. Restart the OctoPrint server (OctoPi: sudo service octoprint start). You are done.

Completely manually

  1. Copy the backup to the OctoPrint instance you want to restore it on (e.g. through SCP)
  2. Open a command line on the system running OctoPrint (e.g. through SSH)
  3. Shutdown the OctoPrint server (OctoPi: sudo service octoprint stop)
  4. Unzip the backup to a folder of your choice (OctoPi: unzip backup.zip -d ~/backup). After unzipping, the target folder should contain the following elements:
    • basedir - this is the backup of the base directory, containing your settings, plugin data and - if not excluded from the backup - also your uploads and timelapse files
    • metadata.json - this contains some metadata about the backup itself
    • plugin_list.json - this contains information about the plugins that were installed on the backuped instance
  5. Copy everything contained under basedir into your OctoPrint instances base directory (OctoPi: cp -r -a ~/backup/basedir/* ~/.octoprint). By default that will be on Linux at ~/.octoprint, on Windows at %APPDATA%/OctoPrint and on Macs at ~/Library/Application Support/OctoPrint.
  6. Restart your OctoPrint server (OctoPi: sudo service octoprint restart). You should now be able to log in with your old credentials. Your plugins are still missing though.
  7. Copy paste the contents of plugin_list.json into https://jsonformatter.org/ to make them better readable.
  8. In OctoPrint, open the Plugin Manager and click on "Get more...". Go through plugin_list.json and install all plugins. There might be plugins that aren't registered on the official plugin repository because their authors haven't (yet) chosen to do so. For such plugins you might find installation instructions at the linked plugin homepage.
  9. Restart OctoPrint a final time. You are done.