-
Notifications
You must be signed in to change notification settings - Fork 366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include upgrade script for OctoPrint #4
Comments
I tried the update steps noted in the Wiki, namely: Which seems similar to what you are saying (but allows me to get the Devel) branch, but it lost my settings (for example my user account, etc). Is this normal? Do I need to somehow manually hang onto certain files, etc? Could someone point me to some instructions so I don't have to spend a age working it out (I'm a Git & Linux novice...). |
What does A git pull shouldn't cause your settings to vanish and I also do my best to make config options auto migrate when I have to change stuff there. |
Hi Gina, Thanks for responding and apologies for taking so long. I thought I would not contaminate the comments with a message simply saying I would get back to you. Due to needing my printer in a hurry and being busy I simply restored a backup image to a spare SD card and have been using my machine. Today I got a chance to boot up the "faulty"(upgraded) image on a spare Raspi. And would you know, it works. Maybe I didn't reboot it properly or something, but it seems I was wrong, this seems to work fine!! Apologies for wasting your time. |
Just for the record, updating instructions can also be found in the OctoPrint FAQ. The above script will not work correctly on OctoPi since that uses a virtualenv, so you need to use the correct |
@foosel This script uses virtualenv, its been tested. Note |
@guysoft sorry, I meant the one from this comment with my warning Also, with octopi 0.9 it should be |
Just remembered this, I've been working on an updater for OctoPrint, any OctoPrint Plugins and also OctoPi (which at the moment depends on a update tar ball with updated files + an update script included to be published with the release on github, which can be easily done). I haven't yet come around to properly document everything (a common problem for me it seems...) but I just wanted to give a heads-up that I have something that is already working tremendously well for keeping the 10 or so RPis of my colleagues updated. |
@foosel I am not sure it would be that simple to make OctoPi update itself depending only on a tar file, because installation of deb packages might be a problem, moreover when we update the raspbian image critical things change, but I guess its worth a shot. |
Installation (and removal) of deb packages so far works great. As I said, it's not just a tar file that get's unpacked, there's also an update script included that get's executed as root and can do more sophisticated stuff. Take a look at the tarballs at https://github.com/OctoPrint/OctoPiUpdates/releases |
As added information, this is the corresponding OctoPrint Plugin which checks against github if a new OctoPi release is available and knows how to perform the update and this is the actual Update plugin into which the OctoPi updater hooks itself and which can check for updates against local git repos and both branch commits on github and releases published (or not yet published) on github and update by executing an update script (in the case of OctoPrint that does the usual shenanigans with git pull, setup.py install etc) or doing a pip install of a remote package (like the plugin itself), all the while making sure to use the correct python/pip paths. It shows you a nifty little update notification and lists what's new, and also shows you a list of currently tracked components and their local and remote versions. Damn, I really need to get around to documenting all this stuff properly, it's been a bit stressy at work, so I only got to churning out all these fun new toys but not properly document them yet, sorry :/ |
Hi foosel, |
Is this still in TODO?: |
Hey guys, so is there a way to update my OctoPi other than the pip install upgrade of the OctoPrint itself? If I need to get the entire image again and overwrite my image, what's the list of files I want to back up so I don't have to create new logins and API keys for Cura? Worth adding to the readme, I think... |
Not really. I tried once writing a backup script, if you want you can write an analogue "restore" that should do the trick: #!/bin/bash
OS_PATH=/media/path/to/sd/card
DEST_PATH=/tmp/sdcard
rm -rf ${DEST_PATH}
mkdir -p ${DEST_PATH}
backup(){
mkdir -p ${DEST_PATH}$1
cp -av ${OS_PATH}$1 ${DEST_PATH}$1
}
backup /home/pi/.octoprint
backup /home/pi/OctoPiPanel/OctoPiPanel.cfg
backup /etc/network/interfaces
GLOBIGNORE=".:.."
shopt -u dotglob
pushd ${DEST_PATH}
tar czvf backup.tar.gz * |
Can be closed now that OctoPrint ships with integrated update mechanism and OctoPi 0.12 will have that configured out of the box. Reopen if you disagree :) |
Upgrading the OctoPrint means all the rest of the plugins and components of OctoPi are upgraded too? like the mjpeg streamer and other bits? or do those get upgraded with an apt-get upgrade? specifically, I have 2015-06-13_2015-05-05-octopi-wheezy-0.12.0.zip installed. should I overwrite it with the latest image or is there an in-place upgrade procedure by now? |
I have been thinking for a while to include a script that will let you upgrade to the latest and greatest OctoPrint, and would also include rollback support.
I have a feeling other people have already things they use, so please feel free to share your snippets so we can get the best result.
Meanwhile you can update manually using:
The text was updated successfully, but these errors were encountered: