-
Is there a process to upgrade from an earlier version without losing data? |
Beta Was this translation helpful? Give feedback.
Answered by
jasonacox
Apr 2, 2022
Replies: 1 comment 9 replies
-
That's a great question @itsits - The data is stored in the influxdb folder. I should add an #!/bin/bash
echo "Upgrade Powerwall-Dashboard"
echo "---------------------------"
echo "This script will upgrade you to the latest version without"
echo "removing existing data. A backup is still recommended."
echo ""
read -r -p "Upgrade - Proceed? [y/N] " response
if [[ "$response" =~ ^([yY][eE][sS]|[yY])$ ]]
then
echo ""
else
echo "Cancel"
exit
fi
echo "Pull influxdb.sql, dashboard.json, telegraf.conf, and other changes..."
git pull
echo ""
echo "Add downsample continuous queries..."
docker exec -it influxdb influx -import -path=/var/lib/influxdb/influxdb.sql
echo ""
echo "Delete and Upgrade pyPowerwall to Latest"
docker stop pypowerwall
docker rm pypowerwall
docker images | grep pypowerwall | awk '{print $3}' | xargs docker rmi -f
echo "Restarting Powerwall-Dashboard stack..."
docker-compose -f powerwall.yml up -d
# Display Final Instructions
cat << EOF
------------------[ Update Dashboard ]-----------------
Open Grafana at http://localhost:9000/
* From 'Dashboard\Manage' (or 'Dashboard\Browse'), select 'Import', and upload 'dashboard.json' from
EOF
pwd
echo ""
echo "Done"
|
Beta Was this translation helpful? Give feedback.
9 replies
Answer selected by
itsits
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That's a great question @itsits - The data is stored in the influxdb folder. I should add an
upgrade.sh
to the root folder. It would basically be this: