Photo credit - panumas nikhomkhai
The information in your openMAINT instance is stored in a PostgreSQL database. It can be simply backed up in the form of a
.dump file with a single command.
Follow this guide for an explanation of how
pg_dump works in the context of openMAINT’s database.
Note: At the time of writing, the most recent version of openMAINT is openMAINT 3.4 and it is still recommended to use PostgreSQL version 10, so this guide will assume your database is also configured for use with PostgreSQL 10.
We will use
pg_dump to create a
.dump file of our PostgreSQL database. Modify the following command to fit your database and name the output file, and use it to create your database backup:
1 pg_dump -Fc -h 127.0.0.1 --cluster 10/main -U postgres <your_database_name> -f openMAINT_backup_MM_DD_YYYY.dump
-Fcflag specifies that the database has a custom format.
-hflag specifies the host
127.0.0.1in the case of a standard openMAINT installation
--clusterflag specifies version
10/main. This is necessary to avoid version mismatching when restoring to an instance of openMAINT running on top of PostgreSQL 10.
-Uflag is our user,
postgres, in the case of a standard openMAINT installation
-fflag specifies our
That’s it! You will find your output
.dump file in whatever directory you ran the command in.
I am not affiliated with Tecnoteca Srl., nor am I maintainer of either openMAINT, or CMDBuild. This guide is written in good faith, and in the spirit of contribution towards the Free Software Movement, for consumption as-is.
Some of the steps listed in this guide may break or cease to function as software packages are updated, deprecated, or become obseleted.