Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
5316 Lượt xem

Hello there,

We are on Odoo 8.

Since many years, we make database dump each day to keep backups of our database. We use this command in a script :

/usr/bin/pg_dump --host localhost --port 5432 -E UTF-8 --format plain --username "odoo" --format plain --file $NOMDUFICHIER $DATABASE


After a dump, a new database is created with :

/usr/bin/createdb --encoding=UTF-8 -U "odoo" $NEWDB


And to finish, the new .SQL is automatically imported in the new database with :

/usr/bin/psql -o /dev/null --quiet -U odoo $NEWDB < $NOMDUFICHIER


At this moment, we get these errors when the database is imported :

7) Importation des données dans la nouvelle base de données...
   + du fichier : /home/flooder/Sauvegardes/odoo_décembre-28-2017_13-03.sql
   + dans la base de données : odoo_décembre-28-2017_13-03
       ERROR:  function "pskill" already exists with same argument types
       ERROR:  function "sfdstf" already exists with same argument types
       ERROR:  function "sys_lig" already exists with same argument types
       ERROR:  function "sys_xmrreval" already exists with same argument types
       ERROR:  function "sys_xmrrevall" already exists with same argument types
       ERROR:  function "syslib" already exists with same argument types
       ERROR:  function "systemlogin" already exists with same argument types


The new database seems to work well, but how could we fix these errors?


Thanks to reply


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Just check out this link it can give you some hints : https://stackoverflow.com/questions/21357348/postgresql-backup-restore-with-custom-functions

Ảnh đại diện
Huỷ bỏ
Tác giả

Thanks for your help!

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 3 15
5807
2
thg 12 24
1277
1
thg 11 23
4034
2
thg 4 22
2685
1
thg 8 19
8811