noalyss-generale
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [noalyss-generale] Noalyss sur yunohost : importer un dossier


From: Mélopie
Subject: Re: [noalyss-generale] Noalyss sur yunohost : importer un dossier
Date: Sat, 28 Aug 2021 12:56:38 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

Bonjour Dany,

Pour accéder aux commandes postgresql, je passe :
sudo -i -u postgres

Ensuite :

pg_restore -Fc -Ox -d dossier34 --role=noalyss_sql /chemin/restauration.bin

J'obtiens toute une liste d'erreurs (WARNING: errors ignored on restore: 695)

par exemple :

pg_restore: [archiver (db)] Error from TOC entry 4747; 2606 51504 FK CONSTRAINT listing listing_fd_id_fkey noalyss_sql
pg_restore: [archiver (db)] could not execute query: ERROR:  insert or update on table "listing" violates foreign key constraint "listing_fd_id_fkey"
DETAIL:  Key (fd_id)=(14) is not present in table "fiche_def".
    Command was: ALTER TABLE ONLY rapport_advanced.listing
    ADD CONSTRAINT listing_fd_id_fkey FOREIGN KEY (fd_id) REFERENCES public.fiche_def(fd_id) ON UPDATE CASCADE ON DELETE SET NULL;

ou :

pg_restore: [archiver (db)] Error from TOC entry 4735; 2606 51399 FK CONSTRAINT user_sec_action_profile user_sec_action_profile_p_id_fkey noalyss_sql
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "user_sec_action_profile_p_id_fkey" for relation "user_sec_action_profile" already exists
    Command was: ALTER TABLE ONLY public.user_sec_action_profile
    ADD CONSTRAINT user_sec_action_profile_p_id_fkey FOREIGN KEY (p_id) REFERENCES public.profile(p_id) ON UPDATE CASCADE ON DELETE CASCADE;

ou:

pg_restore: [archiver (db)] Error from TOC entry 4373; 1259 50880 INDEX x_mt noalyss_sql
pg_restore: [archiver (db)] could not execute query: ERROR:  relation "x_mt" already exists
    Command was: CREATE INDEX x_mt ON public.jrn USING btree (jr_mt);

ou :

pg_restore: [archiver (db)] Error from TOC entry 4517; 2606 50758 CONSTRAINT user_sec_action_profile user_sec_action_profile_pkey noalyss_sql
pg_restore: [archiver (db)] could not execute query: ERROR:  multiple primary keys for table "user_sec_action_profile" are not allowed
    Command was: ALTER TABLE ONLY public.user_sec_action_profile
    ADD CONSTRAINT user_sec_action_profile_pkey PRIMARY KEY (ua_id);

en commençant par :

pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 8; 2615 41101 SCHEMA comptaproc noalyss_sql
pg_restore: [archiver (db)] could not execute query: ERROR:  schema "comptaproc" already exists
    Command was: CREATE SCHEMA comptaproc;

Autant dire qu'il y a un petit problème.

;-/

Mais lequel?

Merci !

Le 27/08/21 à 18:00, noalyss-generale-request@nongnu.org a écrit :
Message: 1
Date: Thu, 26 Aug 2021 19:07:12 +0200
From: Dany De Bontridder <danydb@noalyss.eu>
To: noalyss-generale@nongnu.org
Subject: Re: [noalyss-generale] Noalyss sur yunohost : importer un
	dossier
Message-ID: a016395c-4052-60f8-9519-b6bc1d9ae96f@noalyss.eu" moz-do-not-send="true"><a016395c-4052-60f8-9519-b6bc1d9ae96f@noalyss.eu>
Content-Type: text/plain; charset="utf-8"

Salut,

Il me semble qu'il y a un peu de confusion entre pg_restore et psql , ce
sont 2 outils différents. Et le wiki n'est pas tout-à-fait correcte  à
ce sujet

Si tu as fait le backup avec l'interface , il faut utiliser pg_restore ,
ensuite il faut créér dans l'interface un dossier vide, ce dossier qu'on
appelle dossierXX  sera par exemple dossier26 , ce qui est son nom
postgresql (Etape1)

Si tu as eu le backup par l'interface

_*en tant que postgres , faire*_

 pg_restore -Fc -Ox -d dossierXX  --role=noalyss_sql
/Chemin/FichierdeBackup.bin

Exemple :

 pg_restore -Fc -Ox -d dossier13  --role=noalyss_user 
/Chemin/FichierdeBackup.bin

Et cela fonctionnera :-)

Bonne soirée

D

reply via email to

[Prev in Thread] Current Thread [Next in Thread]