First total outage

bonjour.j’ai simplement lancé dans gladys une mise à jour en cliquant sur…mise à jour….et ma configuration a sauté.il ne reconnait plus mon mail.je suis temp-user…j’avais fait une copie du dossier gladys dans var/lib.est ce qu’une copie de ce dossier me redonnera l’acces? merci

Hi @canaille17
If you do a ‹ restore › of your saved files, you should be up and running again.
From what you describe, it looks like Gladys no longer points to your data directory :face_with_raised_eyebrow:
However, you need to stop Gladys before the restore: docker stop gladys

j’ai demandé de l’aide à gemini.concretement,il m’a fait stopper gladys puis copié depuis ma machine linux mint le dossier gladysassistant de var/lib puis relancé.toujours le meme message adresse mail ou mdp refusé…grrrrr

So either your base config is corrupted, or it’s not pointing to the right directory.

Do you still have the docker run command?
You can post it here to see what might be causing the problem.

And when you’re in your gladys directory, can you give the output of pwd?

PS: I’m always wary of AIs…

cris17@canaille17:~$ docker run
docker: ‹ docker run › requires at least 1 argument

Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG…]

See ‹ docker run --help › for more information
cris17@canaille17:~$

I meant, which command did you run to start Gladys?

sudo docker stop gladys
sudo docker start gladys

I think what @mutmut wants is the command you used to install Gladys. It’s in that command that the location of the folder containing Gladys’s databases is indicated.

The idea is to look at its contents and try to determine what’s going wrong…

1 Like

2. Starting Gladys Assistant

Here is the « universal » command (the one you used). It includes access to the USB ports (Zigbee USB stick) and to the Docker engine for automatic updates.

Bash

docker run -d \
  --log-driver json-file \
  --log-opt max-size=10m \
  --restart=always \
  --privileged \
  --network=host \
  --name gladys \
  -e NODE_ENV=production \
  -e SERVER_PORT=80 \
  -e TZ=Europe/Paris \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v /var/lib/gladysassistant:/var/lib/gladysassistant \
  -v /dev:/dev \
  gladysassistant/gladys:latest

inside my /var/lib

cris17@canaille17:~$ ls -lh /var/lib/gladysassistant
total 1.9M
-rwxrwxrwx 1 root root 476K Feb 27 18:27 gladys-production.db.old
-rwxrwxrwx 1 root root 488K Feb 27 17:56 gladys.db
-rwxrwxrwx 1 root root 488K Feb 27

My backup folder is 9.8 MB.

Normally, if your backup is good, you stop Gladys docker stop gladys , you copy the contents of your backup to /car/lib/gladysassistant then you can restart the container docker start gladys.

Note that if you had configured zigbee2mqtt, MQTT or other containers via Gladys, you must stop them as well before restoring!

Don’t forget to refresh your web page after restoring (consider using a private browsing tab)

ok I’m trying one last time

thanks

Empty the folder /car/lib/gladysassistant before restoring your backup (if it’s good, of course!)

I’m trying

thanks

for me there is a problem : you put gladys-production.db.old (backup of the database) and then you put a new database called gladys.db but that’s not the right name.

ok I’m trying

I’ve just checked the docker run in the doc and you’re missing the line for the database:

-e TZ=Europe/Paris \\-e SQLITE_FILE_PATH=/var/lib/gladysassistant/gladys-production.db \\

This is the line that tells Gladys where the database is.
From what I see in your ls -lh, you have a gladys.db at 17:56; I think that’s your original database (if you created your instance at that time, of course).

So for renaming, I’d say you should change gladys.db to gladys-production.db.
Then you’ll need to add the missing line to the docker run, which would give:

sudo docker run -d \
--log-driver json-file \
--log-opt max-size=10m \
--cgroupns=host \
--restart=always \
--privileged \
--network=host \
--name gladys \
-e NODE_ENV=production \
-e SERVER_PORT=80 \
-e TZ=Europe/Paris \
-e SQLITE_FILE_PATH=/var/lib/gladysassistant/gladys-production.db \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /var/lib/gladysassistant:/var/lib/gladysassistant \
-v /dev:/dev \
-v /run/udev:/run/udev:ro \
gladysassistant/gladys:v4

merci je vais essayer….

comme je ne savais plus où j’en etais,j’ai refait une install propre en gardant le max.je me reconnecte et je vais reinjecter le fichier(avec precaution) pour recuperer ma base.je verrais si ça tourne…demain…merci à tous pour votre aide….à suivre,ce n’est surement pas terminé :slight_smile:

No worries @canaille17, the main thing is this line that defines the database — the file names must match for it to work properly.
And above all, don’t forget to stop the Glady container before replacing the file.