Dear all, I'm trying to backup and restore my CMDBuild instance.
I set owner for CMDBuild database as superuser.
So if I run following command:
pg_dump -Fp -o originalDb > /tmp/backup.sql
and I try to restore this database in a database copy by following commands:
sudo su - postgres
psql
CREATE DATABASE copyDb WITH OWNER = myadmin TABLESPACE = pg_default CONNECTION LIMIT = -1 ENCODING = 'UTF8';
GRANT ALL PRIVILEGES ON DATABASE copyDb to myadmin;
\c copyDb;
\i /tmp/backup.sql
Now if I run this query on originalDb and copyDb I must view same class id:
SELECT classid FROM system_classcatalog WHERE className = 'MyCMDBuildCard'
while I get different class identifier.
How can I execute a complete dump with original class identifier?
CMDBuild works with the standard backup / restore of Postgres.
Since CMDBuild does not use the “Table OID” is not important that they are the same or different.
CMDBuild Team
Thanks for your reply.
Problem is that I have another schema in my CMDBuild database that uses class identifier from public schema as foreign key. If class identifier changes after a restore the relations between my schema and public schema are broken. Any idea?
Thanks a lot
Previously Tecnoteca wrote:
CMDBuild works with the standard backup / restore of Postgres.
Since CMDBuild does not use the "Table OID" is not important that they are the same or different.
CMDBuild Team
Thanks for your reply. Issue is that I have another schema in my CMDBuild database related with public schema.
So, if class identifier change after a restore the relations between my schema and schema public are broken.
Any idea?
Previously Tecnoteca wrote:
CMDBuild works with the standard backup / restore of Postgres.
Since CMDBuild does not use the "Table OID" is not important that they are the same or different.
CMDBuild Team
If you refer to a table as type “regclass” it remains unchanged, as “OID” it changes.
CMDBuild uses the first mode, I do not know how to solve your problem in the second mode.
CMDBuild Team
I understand. Thanks.
Previously Tecnoteca wrote:
If you refer to a table as type "regclass" it remains unchanged, as "OID" it changes.
CMDBuild uses the first mode, I do not know how to solve your problem in the second mode.
CMDBuild Team