Projet

Général

Profil

Tâche #37187

Scénario #36917: Test de migration complète d’un EOLE 2.8 vers EOLE 2.9 / 2.10 avec Envole

les bdd ne sont pas restaurés

Ajouté par Ludwig Seys il y a 5 mois. Mis à jour il y a 3 mois.

Statut:
Fermé
Priorité:
Normal
Assigné à:
-
Version cible:
Début:
05/11/2025
Echéance:
% réalisé:

0%

Restant à faire (heures):
0.0

Description

dans la sauvegarde poussé sur eole-ci-test plusieurs application ont des données ajoutés cf #37149 :

Après restauration ces données ne sont pas retrouvées !

Pour l'exemple je vais montrer pour grr après restauration (e-restaure) + reconfigure :

1. affichage de la page web fonctionnel
2. pas de données
3. vérification dans la sauvegarde :

root@scribe:~# grep -RI "bricolage" /home/sauvegarde/
/home/sauvegarde/scribe-0000000A/mysql/grr.sql:INSERT INTO `grr_entry` (`id`, `start_time`, `end_time`, `entry_type`, `repeat_id`, `room_id`, `timestamp`, `create_by`, `beneficiaire_ext`, `beneficiaire`, `name`, `type`, `description`, `statut_entry`, `option_reservation`, `overload_desc`, `moderate`, `jours`, `clef`, `courrier`) VALUES (1,1762245000,1762252200,0,0,1,'2025-11-04 13:13:16','ADMIN','','admin','bricolage','A','','-',-1,'',0,0,0,0),(2,1763452800,1763467200,0,0,1,'2025-11-04 13:15:15','ADMIN','','admin','etude','D','','-',-1,'',0,0,0,0),(3,1762858800,1762862400,0,0,1,'2025-11-04 13:16:45','PROF1','','PROF1','manger','C','','-',-1,'',0,0,0,0);

On a bien bricolage par exemple qui est l'une des données ajoutés.

4. check de la bdd, constat => il n'y a pas les données !

root@scribe:~# echo $IPSQL
localhost
root@scribe:~# mysql -h $IPSQL -uroot -p123456 -e "SHOW DATABASES LIKE 'grr';"mysql -h $IPSQL -uroot -p123456 -e "SHOW DATABASES LIKE 'grr';"mysql -h $IPSQL -uroot -p123456 -e "SHOW DATABASES LIKE 'grr';"^C
root@scribe:~# mysql -h $IPSQL -uroot -p123456 -e "SHOW DATABASES LIKE 'grr';" 
mysql: [Warning] Using a password on the command line interface can be insecure.
+----------------+
| Database (grr) |
+----------------+
| grr            |
+----------------+
root@scribe:~# mysql -h $IPSQL -uroot -p123456 -e "USE grr; SHOW TABLES;" 
mysql: [Warning] Using a password on the command line interface can be insecure.
+----------------------------+
| Tables_in_grr              |
+----------------------------+
| grr_area                   |
| grr_area_periodes          |
| grr_calendar               |
| grr_calendrier_feries      |
| grr_calendrier_jours_cycle |
| grr_calendrier_vacances    |
| grr_correspondance_statut  |
| grr_entry                  |
| grr_entry_moderate         |
| grr_files                  |
| grr_j_mailuser_room        |
| grr_j_site_area            |
| grr_j_type_area            |
| grr_j_user_area            |
| grr_j_user_room            |
| grr_j_useradmin_area       |
| grr_j_useradmin_site       |
| grr_j_userbook_room        |
| grr_log                    |
| grr_modulesext             |
| grr_overload               |
| grr_page                   |
| grr_participants           |
| grr_repeat                 |
| grr_room                   |
| grr_setting                |
| grr_site                   |
| grr_type_area              |
| grr_utilisateurs           |
+----------------------------+
root@scribe:~# mysql -h $IPSQL -uroot -p123456 -e "SELECT COUNT(*) FROM grr.grr_entry;" 
mysql: [Warning] Using a password on the command line interface can be insecure.
+----------+
| COUNT(*) |
+----------+
|        0 |
+----------+
root@scribe:~# mysql -h $IPSQL -uroot -p123456 -e "SELECT id,name,start_time FROM grr.grr_entry ORDER BY id LIMIT 5;" 
mysql: [Warning] Using a password on the command line interface can be insecure.

5. On va restaurer brutalement (remise à zéro et injection) et on a bien cette fois les données !! :

mysql -h "$IPSQL" -uroot -p123456 -e \
"DROP DATABASE IF EXISTS grr;
 CREATE DATABASE grr DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;" 
mysql: [Warning] Using a password on the command line interface can be insecure.
root@scribe:~# mysql -h "$IPSQL" -uroot -p123456 --default-character-set=utf8mb4 \
      --init-command="SET FOREIGN_KEY_CHECKS=0; SET UNIQUE_CHECKS=0;" \
      grr < /home/sauvegarde/scribe-0000000A/mysql/grr.sql
mysql: [Warning] Using a password on the command line interface can be insecure.
root@scribe:~# mysql -h "$IPSQL" -uroot -p123456 -e "SELECT COUNT(*) FROM grr.grr_entry;" 
mysql: [Warning] Using a password on the command line interface can be insecure.
+----------+
| COUNT(*) |
+----------+
|        3 |
+----------+
root@scribe:~# mysql -h "$IPSQL" -uroot -p123456 -e "SELECT id,name,FROM_UNIXTIME(start_time) AS start_dt FROM grr.grr_entry ORDER BY id LIMIT 10;" 
mysql: [Warning] Using a password on the command line interface can be insecure.
+----+-----------+---------------------+
| id | name      | start_dt            |
+----+-----------+---------------------+
|  1 | bricolage | 2025-11-04 09:30:00 |
|  2 | etude     | 2025-11-18 09:00:00 |
|  3 | manger    | 2025-11-11 12:00:00 |
+----+-----------+---------------------+

Note: mes commandes ne sont peut-être pas top, ou correct !!

6. on relance apache2 et c'est reparti ! sauf que ...

6.1 cf image grr-bdd-restore01
grr semble ne pas aimer !

6.2 j'ai choisi mettre à jours la bdd (cf image grr-bdd-restore02)

6.3 ça c'est bien passé ! (cf image grr-bdd-restore03)

mais maintenant la page m'affiche : Echec de connexion à GRR.
Identification correcte mais l'importation du profil est impossible. Veuillez signaler ce problème à l'administrateur GRR.

je suis peut-être en tort vu que pour faire la mise à jours j'ai modifié le mot de passe admin dans la bdd de grr, (mais j'ai ensuite remis Eole12345!)

root@scribe:~# mysql -h localhost -uroot -p123456 -e " 
UPDATE grr.grr_utilisateurs
   SET password = MD5('Admin1234!'),
       statut   = 'administrateur',
       etat     = 'actif'
 WHERE login IN ('ADMIN','admin');" 

Je pense qu'il y a là une bonne piste pour l'absence de restauration des data pour toutes les application envole (homris nextcloud et roundcube)

grr-bdd-restore01.png Voir (35,2 ko) Ludwig Seys, 05/11/2025 11:06

grr-bdd-restore02.png Voir (69,3 ko) Ludwig Seys, 05/11/2025 11:06

grr-bdd-restore03.png Voir (110 ko) Ludwig Seys, 05/11/2025 11:06

Historique

#1 Mis à jour par Arnaud FORNEROT il y a 4 mois

  • Statut changé de Nouveau à Résolu

n'a pas été reproduit
à mon avis il y avait un problème d'espace disque

#2 Mis à jour par Arnaud FORNEROT il y a 3 mois

  • Statut changé de Résolu à Fermé
  • Restant à faire (heures) mis à 0.0

Formats disponibles : Atom PDF