Comments (10)
Sorry about that. I thought I would have caught that in testing before I pushed the update.
fixed with commit 0183a88
from mycodo.
No problem. I made a much bigger mess trying to copy back a good backup :)
Anyway, started form the beginning, everything went normal, and now checking it, looks fine.
Thanks!
from mycodo.
FYI, you should be able to just copy the backup in place of the current /home/user/Mycodo and then run "sudo /etc/init.d/mycodo initialize" to get things set up. I haven't had to go back to a previous version (I've only copied previous databases to the new version) but that should work for the entire backup.
from mycodo.
Thanks for the info...
The copying worked OK, the web interface, and relays/sensors, etc. But when I wanted to check/update to the newest version, it said that it is already the newest one. Which was obviously incorrect (it showed 3.7.74, and the newest is obviously 3.5.76). I did not now about the initialize command...
from mycodo.
Interesting. I haven't thought about the .git directory that may hinder the update if a backup is reused. I'll have to test that later. Thanks for the info, I'll reopen this as a reminder.
from mycodo.
I'm stumped as to how to properly use a backup and keep the update system working. It appears the easiest way to get caught back up is to do another clone and copy the database files in config/ to the clone.
from mycodo.
I see. In an ideal worlds, rolling back would be easy, isn't this the purpose of git?
This database copy looks strait-forward. In that case, wouldn't be enough to copy only the config directory to the backup? And keep a text file there with short instructions for the process.
from mycodo.
OK, so did some quick & dirty experimenting...
'git reset --hard '
worked to set back the state of the program (I went back 4 commits, not that I don't like the green buttons, just to make sure that it is immediately evident that it worked by seeing the blue ones).
I did not run all the things from the update script, but still worked. I guess there was no change in the symlink, init.d script, or the database...
And then the important thing: it was readily upgradeable to the newest version through the interface.
So this backup thingy may be easier than copying, just store the commit identifier... and revert back. Or even better, you can define certain stable versions that may be selected from the update screen, and you direct the update script to pull that version...
from mycodo.
I decided on the full directory backup to make sure if any custom code has been used, it isn't overwritten during the update.
I'm not well-versed in git usage. I've always stuck to the basics because that's all I've needed. I'll open an issue for improving the update/backup process, but it may not get any attention until I I read/test some of these git operations.
from mycodo.
I'm not a git wizard either, just tried the first Google tip on rolling back a repo...
Anyway, just see now that the command did not copy fully, the commit ID should be the parameter where to go back.
You are right, custom code is a valid point... I may try it later, since I just made some changes on log formatting, it is a good candidate for testing, if I screw it, nothing important is lost.
from mycodo.
Related Issues (20)
- Blank Widgets HOT 10
- mycodo ERROR - mycodo.influx - Unknown Influxdb version: HOT 3
- Action - Ramp Value
- add ability to copy a function
- Request to add DFRobot i2c Fermion: LWLP5000 Differential Pressure Sensor (±500pa)
- Allow setting the same output für PID Controller and PID Autotune
- request add Days Counter with advanced functions
- PID widgets display null instead of negative values HOT 12
- Volume Flow Rate in Gallons as well as Liters HOT 1
- Reverse pumping using trigger function with volume not permitted
- Upgrade problem HOT 6
- fswebcam and config file HOT 1
- Installing dependency `bluepy` results in `Could not build wheels for bluepy` HOT 2
- Introducing a Version of the Enhanced Mycodo Integration for Home Assistant HACS HOT 3
- Error with I2C OLED: NameError 'DigitalInOut' is not defined in spi_device.py HOT 3
- Please add MQTT Publish Action to Vapor Pressure Deficit Function, or a Function that can publish mult-values in JSON packet format.
- CCS811 measures continuosly rising
- BME680 co2 measurment
- Running 2 BME680 on 1 i2c bus with master/slave address - second sensor not initializing
- MAX31855 thermocouple input library errors HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mycodo.