Replies: 8 comments 7 replies
-
Hey @FreydNot! Thanks for opening an issue. That's good to know about the mqtt issue - I'm not too sure what the conflict is without diving further. But, since there's an update for my project available, that's a good place to start! You may also be interested in the MQTT plugin that @jmadden91 authored (just waiting on the final usage documentation from him) Regarding your questions:
Yes, that's right. Thank you for letting me know - I'll update the instructions. (Technically, v0.3.1 does not include any changes to the power monitor code - it's just an update to the custom OS image, but you can of course still checkout v0.3.1).
Yes, that is fine if you do it before, but you don't need to do it at all if you don't want to. The apt update and apt upgrade is going to update your underlying operating system packages, which isn't required to run v0.3.0. However, it is usually a good idea to keep your system up to date. I would not expect the update to throw any errors, but if it does, feel free to share them here and we can look at it together.
No. The database structure is the same in v0.3.0 as v0.2.0. The database changes were really only when going from v0.1.0 to v0.2.0. You don't need to do anything to the database when upgrading from v0.2.0 to v0.3.0. For more information on the database structure and retention policies, see this page here in the new docs:
That's not an awful idea, but it also isn't necessary. On the other hand, it would be a good opportunity to replace your microSD card (if it's not a high endurance card), or upgrade to a NVMe drive. I don't currently have data restoration procedures written/published, but it's pretty straightforward with just a few CLI commands. Regardless of whether or not you decide to wipe and start fresh, you'll have to go through the new calibration setup, which thankfully is much easier and faster now. So, you'll essentially be setting up the power monitor again either way, and can carry your old data forward either way. After you're on v0.3.0, I highly recommend enabling automatic backups for peace of mind! Feel free to reach out here if you get stuck along the way! |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick response. If there is no database change, can I backup my current database (with your v3.0 script or by hand in a shell), start over from the prebuilt image and restore my v2 backup onto the new v3 system? That seems like the cleanest and easiest way to go. Are the CLI commands to restore a backup documented anywhere? |
Beta Was this translation helpful? Give feedback.
-
tl;dr I tried going to automatic script route, but it didn't work. I'll move to the manual route. I'm pretty sure I've got everything in the right place and set up properly.
My system is a bit unusual. My main drive is a SATA SSD hanging off a USB adapter. This shows up as sda. My USB drive for backups shows up on sdb.
First I tried to run the script normally.
That's weird. Maybe I need to give it super user permissions...
¯\_(ツ)_/¯ Probably a good idea to wipe this whole thing and start over from scratch. I'll just do it manually. |
Beta Was this translation helpful? Give feedback.
-
Well, the manual backup was successful (I think) but the test restore fails.
I guess it's possible I've done this before. I'll try a different database name...
Nope. Must be some other problem. I'm going to pause here since I can't guarantee the validity of my backup. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Running
I'm going to repeat the manual backup and manual restore process again using a different new database name and take better notes on the restore process in case I missed something. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
So, I decided it would be easiest to just spin up a second instance of power-monitor on a second Rpi and a second hard drive. Everything went smoothly with the data restore and now my restored Grafana dashboards match the current one. Problem solved. Moving along to reinstalling. |
Beta Was this translation helpful? Give feedback.
-
I have an instance currently running version 2. I'd like to upgrade to version 3. I'd just start over with the pre-built image, but I'd like to preserve my historical data. So, upgrade in place it is.
If I'm understanding correctly, I just follow the instructions on the beta release page. I assume I should use "git checkout v0.3.1", right?
Sounds simple, but I have some questions.
Should I do an apt update and apt upgrade before I start? What happens if that throws errors?
Does the database undergo migration of any kind upon first run of v3? I understand there have been changes and now there is a short term, high resolution data base and a lower resolution (5 minute) long term database. Do I need to intervene in any way?
Once I have v3 running, I'm inclined to make a backup, wipe the drive, start over from the pre-built image and then restore the backup. The idea being I would be as close to a normal install as possible. Am I over thinking this?
If anyone is interested, this upgrade was prompted because I ran into issues trying to install rpi-power-monitor-mqtt. Specifically this:
Beta Was this translation helpful? Give feedback.
All reactions