What are the pg_ commands you are using? These are the commands I use to 
dump and then restore and I've never had a problem.

pg_dump -U USERNAME -F t -f NAMEOF.backup DATABASE-NAME 

pg_restore -d DATABASE-NAME -O -U USERNAME NAMEOF.backup



On Monday, March 24, 2014 2:28:41 AM UTC-6, Federico Bruni wrote:
>
> I've made the dump of the local database and I've tried to restore it on 
> the server, but I'm getting the error below.
> BTW, how can I force the output to be in english? I've tried LANG=C but 
> didn't work. Should I change the locale on the server?
>
> Any help appreciated.
>
> _restore: [archiviatore (db)] Errore nella voce TOC 2142; 2606 26962 FK 
> CONSTRAINT to_blogpost_id_refs_id_6404941b fede
> pg_restore: [archiviatore (db)] could not execute query: ERRORE:  il 
> vincolo "to_blogpost_id_refs_id_6404941b" per la relazione 
> "blog_blogpost_related_posts" esiste già
>     Command was: ALTER TABLE ONLY blog_blogpost_related_posts
>     ADD CONSTRAINT to_blogpost_id_refs_id_6404941b FOREIGN KEY 
> (to_blogpost_id)...
> pg_restore: [archiviatore (db)] Errore nella voce TOC 2172; 2606 26967 FK 
> CONSTRAINT twitter_tweet_query_id_fkey fede
> pg_restore: [archiviatore (db)] could not execute query: ERRORE:  il 
> vincolo "twitter_tweet_query_id_fkey" per la relazione "twitter_tweet" 
> esiste già
>     Command was: ALTER TABLE ONLY twitter_tweet
>     ADD CONSTRAINT twitter_tweet_query_id_fkey FOREIGN KEY (query_id) 
> REFERENCES twitter_quer...
> pg_restore: [archiviatore (db)] Errore nella voce TOC 2133; 2606 26972 FK 
> CONSTRAINT user_id_refs_id_40c41112 fede
> pg_restore: [archiviatore (db)] could not execute query: ERRORE:  il 
> vincolo "user_id_refs_id_40c41112" per la relazione "auth_user_groups" 
> esiste già
>     Command was: ALTER TABLE ONLY auth_user_groups
>     ADD CONSTRAINT user_id_refs_id_40c41112 FOREIGN KEY (user_id) 
> REFERENCES auth_user(id)...
> pg_restore: [archiviatore (db)] Errore nella voce TOC 2135; 2606 26977 FK 
> CONSTRAINT user_id_refs_id_4dc23c39 fede
> pg_restore: [archiviatore (db)] could not execute query: ERRORE:  il 
> vincolo "user_id_refs_id_4dc23c39" per la relazione 
> "auth_user_user_permissions" esiste già
>     Command was: ALTER TABLE ONLY auth_user_user_permissions
>     ADD CONSTRAINT user_id_refs_id_4dc23c39 FOREIGN KEY (user_id) 
> REFERENCES aut...
> ATTENZIONE: errore ignorato durante il ripristino: 219
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to