Recovering a configuration

Hello,

After having messed around a bit on my Raspberry Pi that hosts Gladys, I think I will cleanly reinstall the OS with the latest image provided by the Gladys project.

Is it possible to import into this new instance the MQTT device configurations that were created in the old Gladys?

A bit like in Node-RED!

Thanks

For that, you need a Gladys Plus account. This will allow you to retrieve your configuration, your scenes, …

Thank you for the quick response.

So the option is only available in Gladys-Plus. Is it worth submitting a feature request to make it available to all users?

Well, no, because the feature exists but you need Gladys Plus.

I

If you look closely, it has already been explained :wink:
You must, in SSH, type the command ‹ docker stop gladys ›.
Then, copy the file ‹ gladys-production › from ‹ /var/lib/gladysassistant ›
You will just need to put this file back in place after a full reinstallation.
For ZigBee, you need to go through the zigbee

1 Like

@GBoulvin, thanks so much. I thought it existed but couldn’t find it again on the forum where I’d seen it.

Sorry for the slightly provocative comment.

Keep it up,

2 Likes

Retrieving the Gladys configuration works great by following the procedure. Thanks again @GBoulvin.

Don’t forget to give write permissions to the folder ‹ /var/lib/gladysassistant ›. On Linux: sudo chmod 777

1 Like

While searching, he also found this solution
https://www.npmjs.com/package/backup-docker

Be careful with this kind of tool, I don’t know how it works internally, but I’d be surprised if it worked reliably.

Copying/pasting files live on a production instance while it’s running is the best way to end up with a shaky backup, or worse, to break your production.

The best method has already been mentioned by @GBoulvin above:

You need to stop Gladys, then back up the files, then restart Gladys.

Ah yes, but I was only talking about backing up the Node-RED part; for the Gladys part there’s Gladys-plus that does the job and, on top of that, no need for a NAS! But as I said above, the day Gladys manages the Docker Node-RED with flow backups :+1: :stuck_out_tongue_winking_eye: :crazy_face:…and actually I mixed things up with another reply :face_with_thermometer:

For those who use Gladys without the Plus, wouldn’t it be possible to run a bash script with cron (or Node-RED), for example every day at 4 a.m., like:

#! /bin/bash

docker stop gladys
rsync gladys-production.db gladys-prod-sauvegarde.db
docker start gladys
1 Like

No one is stopping you; there is no technical issue.

1 Like