I run Teddycloud on my Raspberry Pi 2 via Portainer and connected two Boxes (1x CC3200 and 1x ESP32). Setup was working very well with all instructions available in the forum. Big thanks to everybody that contributes to this great project.
Now I want to move Teddycloud from the Rasperry 2 to a Raspberry 4 to make it more responsive. I couldn’t find any backup/restore instructions on Teddycloud and the forum. I guess that the new Raspberry would need to be setup and run Portainer and then the stack can be restored but here I am a bit lost since I am not very familiar with the Portainer application.
Would highly appreciate if users that already did backup and restore the complete Teddycloud setup would share a short instruction on how to properly do this. Is there some dedicated backup/restore option within Portainer or Teddycloud? I could only find backup options for the Portainer settings, which didn’t include any stacks, volumes, etc.
Instructions might be useful for a lot of entry level users that were able to setup Teddycloud through the instructions provided within the forum and might need to backup/restore in future.
Highly appreciate every feedback and merry christmas
I just did it two days ago. I’m not aware of a backup feature in Portainer so I did it manually.
As already mentioned, you have to backup the used volumes of Teddycloud. Depending on your docker-compose.yaml, it depends where they are stored. If you didn’t use custom bind mounts but the proposed file from Team Revvox, they are most probably in the default path like in my example.
Find all used volumes of Teddycloud docker inspect -f '{{range .Mounts}}{{.Type}}: {{.Source}} => {{.Destination}}{{println}}{{ end }}' teddycloud
Result:
Backup these folders
You can copy them to an external drive, a network mount (NAS), secure-copy them to another machine (what I did) or use rsync to sync them to a target of your choice.
I copied all volumes starting with teddy* to another Pi/Mac and then the custom_img one manually:
After you setup your new Pi 4 with docker and teddycloud, before starting the stack/container for the first time, copy all these volumes back to the same position where they have been before (/var/lib/docker/volumes/teddycloud*). You need sudo again.
That’s it.
Btw: the best thing you can do tou your Pi is to get rid of the internal sd card (or just use it for backups) and boot everything from an external SSD (via USB3). So the whole OS. It’s a huge performance improvement (I/O) as well as way more robust. External SSDs with 256GB size are really cheap these days. Doesn’t have to be the fastest one as it’s limited by USB3 anyway, but even “slower” SSD are a lot faster than the internal SD. I bought this one for 25€ (Deal).
I initially had problems connecting to boxine cloud. In another thread it said I should try adding a second teddycloud container and reflash the box. That worked for connecting to boxine cloud. As I did that, all my new certificates, contents, library etc. were in oddly named folders (e.g. 0f1ca56e0b2e5ed66cc740625931d3…). I had to search for names of files in the original folder (e.g. teddycloud_content etc.) in winSCP to get the files teddycloud uses now. I copied all files from oddly named folders and put them into the original named one (teddycloud_certs etc.) in VM docker, installed teddycloud using stacks and it worked flawlessly, first try.
The reason for typing all this is, that someone may needs that information.