Project

General

Profile

Tâche #17156

Distribution EOLE - Scénario #16962: Traitement express MEN (36-38)

Horus 2.5.2 : Erreur Bareos "unsupported type: sqlite3 for restoring"

Added by CAMILLE JACTARD about 3 years ago. Updated almost 3 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Start date:
09/19/2016
Due date:
% Done:

100%

Estimated time:
3.00 h
Spent time:
Remaining (hours):
0.0

Description

Bonjour,
Lors d'un changement de machine nous rencontrons un problème pour restaurer la sauvegarde via Bareos.
Les 2 serveurs sont sous Horus 2.5.2 (même version exactement)
Lors de la sauvegarde tout se passe bien, mais lors de la restauration du catalogue on obtient :

root@h-clg-1188y:~# bareosrestore.py --catalog 127.0.0.1-dir

Restauration du catalogue

Le fichier config.eol a été restauré avec le nom /root/zephir-restore.eol

Pour que ce fichier soit pris en compte, il faut le déplacer : mv /root/zephir-restore.eol /etc/eole/config.eol

unsupported type: sqlite3 for restoring

Et du coup impossible de restaurer quoique ce soit.

Associated revisions

Revision e391720f (diff)
Added by Emmanuel GARETTE almost 3 years ago

La restauration en mode sqlite3 n'est pas fonctionnel (ref #17156 @3h)

Revision 67c6969c (diff)
Added by Emmanuel GARETTE almost 3 years ago

ne pas faire la base sqlite en cas de restauration de la base (ref #17156 @1h)

History

#1 Updated by Emmanuel GARETTE about 3 years ago

  • Assigned To set to Emmanuel GARETTE

Bonjour,

Pourriez-vous éditer le fichier /usr/lib/python2.7/dist-packages/pyeole/bareosrestore.py et supprimer les deux lignes :

    else:
        raise Exception('unsupported type: {0} for restoring'.format(catalog_db_type))

Dans la fonction bareos_restore_dump ?

Il semblerait que la restauration "sqlite3" ne soient pas complètement fonctionnel sur la 2.5 (sur 2.6 il ne semble pas y avoir de problème).

Cordialement,

#2 Updated by Emmanuel GARETTE about 3 years ago

  • Status changed from Nouveau to En attente d'informations

#3 Updated by CAMILLE JACTARD almost 3 years ago

Alors voici le résultat du test (non concluant) :

Restauration du catalogue
Le fichier config.eol a été restauré avec le nom /root/zephir-restore.eol
Pour que ce fichier soit pris en compte, il faut le déplacer : mv /root/zephir-restore.eol /etc/eole/config.eol
  1. Régénération du catalogue Bareos##
    Stop System V service bareos-dir [ OK ]
    Stop System V service bareos-sd [ OK ]
    Dropping sqlite3 database
    Drop of bareos database succeeded.
    Creating sqlite3 database
    Creating of bareos database succeeded.
    Making sqlite3 tables
    Error: near line 3: table Filename already exists
    Error: near line 8: table Path already exists
    Error: near line 13: table File already exists
    Error: near line 25: table RestoreObject already exists
    Error: near line 39: table Job already exists
    Error: near line 72: table JobHisto already exists
    Error: near line 101: table Location already exists
    Error: near line 108: table LocationLog already exists
    Error: near line 118: table Log already exists
    Error: near line 125: table FileSet already exists
    Error: near line 135: table JobMedia already exists
    Error: near line 148: table Media already exists
    Error: near line 202: table MediaType already exists
    Error: near line 209: table Storage already exists
    Error: near line 216: table Device already exists
    Error: near line 234: table Pool already exists
    Error: near line 270: table Client already exists
    Error: near line 281: table BaseFiles already exists
    Error: near line 289: table UnsavedFiles already exists
    Error: near line 296: table NextId already exists
    Error: near line 301: UNIQUE constraint failed: NextId.TableName
    Error: near line 302: table Version already exists
    Error: near line 306: table Counters already exists
    Error: near line 314: table PathHierarchy already exists
    Error: near line 320: table PathVisibility already exists
    Error: near line 328: table Status already exists
    Error: near line 334: UNIQUE constraint failed: Status.JobStatus
    Error: near line 335: UNIQUE constraint failed: Status.JobStatus
    Error: near line 336: UNIQUE constraint failed: Status.JobStatus
    Error: near line 337: UNIQUE constraint failed: Status.JobStatus
    Error: near line 338: UNIQUE constraint failed: Status.JobStatus
    Error: near line 339: UNIQUE constraint failed: Status.JobStatus
    Error: near line 340: UNIQUE constraint failed: Status.JobStatus
    Error: near line 341: UNIQUE constraint failed: Status.JobStatus
    Error: near line 342: UNIQUE constraint failed: Status.JobStatus
    Error: near line 343: UNIQUE constraint failed: Status.JobStatus
    Error: near line 344: UNIQUE constraint failed: Status.JobStatus
    Error: near line 345: UNIQUE constraint failed: Status.JobStatus
    Error: near line 346: UNIQUE constraint failed: Status.JobStatus
    Error: near line 347: UNIQUE constraint failed: Status.JobStatus
    Error: near line 348: UNIQUE constraint failed: Status.JobStatus
    Error: near line 349: UNIQUE constraint failed: Status.JobStatus
    Error: near line 350: UNIQUE constraint failed: Status.JobStatus
    Error: near line 351: UNIQUE constraint failed: Status.JobStatus
    Error: near line 352: UNIQUE constraint failed: Status.JobStatus
    Error: near line 353: UNIQUE constraint failed: Status.JobStatus
    Error: near line 354: UNIQUE constraint failed: Status.JobStatus
    Error: near line 355: UNIQUE constraint failed: Status.JobStatus
    Error: near line 356: UNIQUE constraint failed: Status.JobStatus
    Error: near line 357: UNIQUE constraint failed: Status.JobStatus
    Error: near line 358: UNIQUE constraint failed: Status.JobStatus
    Error: near line 359: UNIQUE constraint failed: Status.JobStatus
    Error: near line 360: table Quota already exists
    Error: near line 366: table NDMPLevelMap already exists
    Error: near line 373: table NDMPJobEnvironment already exists
    Error: near line 380: table DeviceStats already exists
    Error: near line 395: table JobStats already exists
    Error: near line 402: table TapeAlerts already exists
    Error: near line 407: index inx1 already exists
    Error: near line 408: index inx2 already exists
    Error: near line 409: index inx3 already exists
    Error: near line 410: index file_jpf_idx already exists
    Error: near line 411: index restore_jobid_idx already exists
    Error: near line 412: index inx6 already exists
    Error: near line 413: index inx61 already exists
    Error: near line 414: index LogInx1 already exists
    Error: near line 415: index inx7 already exists
    Error: near line 416: index inx8 already exists
    Error: near line 417: index basefiles_jobid_idx already exists
    Error: near line 418: index pathhierarchy_ppathid already exists
    Error: near line 420: index pathvisibility_jobid already exists
    Régénération du catalogue terminée
    Suppression des anciens rapports d'état
    Start System V service bareos-dir [ OK ]
    Start System V service bareos-sd [ OK ]

Et le test de restauration (malgré les erreurs ci-dessus) :

Erreur lors de la récupération du catalogue
Restauration de l'annuaire LDAP
La restauration est lancée en tâche de fond.
Vous pouvez suivre son évolution dans le fichier /var/log/bareos/restore.txt.
Attention, un délai est nécessaire avant l'écriture des messages dans le fichier

Restauration mysql
La restauration est lancée en tâche de fond.
Vous pouvez suivre son évolution dans le fichier /var/log/bareos/restore.txt.
Attention, un délai est nécessaire avant l'écriture des messages dans le fichier

#4 Updated by Emmanuel GARETTE almost 3 years ago

  • Estimated time set to 3.00 h
  • Parent task set to #16962

Bonjour,

Dans le fichier /etc/bareos/bareos-dir.conf pourriez remplacer :

dbdriver = "mysql" 

par :

dbdriver = "sqlite3" 

Et relancer la restauration du serveur ?

#5 Updated by CAMILLE JACTARD almost 3 years ago

  • Remaining (hours) set to 3.0

Le dbdriver était déjà en sqlite3 ...

#6 Updated by Emmanuel GARETTE almost 3 years ago

Il reste un soucis :

Dans le fichier /usr/share/eole/sbin/bareosregen.sh commenter la ligne "/usr/lib/bareos/scripts/make_bareos_tables".

Je viens de faire la procédure complète et chez moi ca marche en faisant cela.

#7 Updated by CAMILLE JACTARD almost 3 years ago

Effectivement en faisant cela tout se passe bien (enfin les données sont toujours en cours de restauration).

Merci pour les réponses rapides et efficaces :)

Il nous reste juste à scripter tout ça pour notre petite cinquantaine de Horus 2.5, et nous pourrons ainsi continuer les migrations stoppées jusqu'alors pour ce problème de restauration.

#8 Updated by Emmanuel GARETTE almost 3 years ago

  • Status changed from En attente d'informations to Nouveau

#9 Updated by Emmanuel GARETTE almost 3 years ago

  • Status changed from Nouveau to En cours

#10 Updated by Emmanuel GARETTE almost 3 years ago

  • % Done changed from 0 to 80
  • Remaining (hours) changed from 3.0 to 1.0

Paquet refait en 2.5.2.

Il reste :

- a attendre le résultat des tests automatiques pour valider la sauvegarde/restauration sqlite3 ;
- merger la branche 2.5.2 dans master pour le paquet eole-bareos ;
- compiler les paquets 2.5.2 en candidat et remplir le journal.

#11 Updated by Emmanuel GARETTE almost 3 years ago

  • Status changed from En cours to Résolu

Les paquets sont en candidats, les journaux sont a jour et les tests passent.

#12 Updated by Emmanuel GARETTE almost 3 years ago

  • % Done changed from 80 to 100
  • Remaining (hours) changed from 1.0 to 0.25

#13 Updated by Emmanuel GARETTE almost 3 years ago

  • Status changed from Résolu to Fermé
  • Remaining (hours) changed from 0.25 to 0.0

Also available in: Atom PDF