Backing up dhis2 instance

Hello Team
How do we backup the dhis2 instance, the tomcat server configuration plus the PostgreSQL configuration?

Hi Raphael,

I think you will find what you are looking for in the implementer’s documentation under the section DHIS2 Tools Reference - search for dhis2-backup here: Home - DHIS2 Documentation

2 Likes

HI @Kenyuri.

Please note that the tool @chase.freemanis referring to is an automatic tool part of the dhis2-tool package which is the old version of GitHub - bobjolliffe/dhis2-tools-ng: Next generation dhis2-tools Anyway, the suggested command will only backup the database.

In case you want to backup your PostgreSQL configuration you should have a look at: Home - DHIS2 Documentation
In case you want to backup your Tomcat Server configuration you should have a look at: Home - DHIS2 Documentation
… and also, you probably want to get your Apache/Nginx configuration: Home - DHIS2 Documentation

As you can see from there you might need to backup not only the configuration files but some variables defined and scripts. Also think about the system users that you have might created etc.

My recommendation would be that you follow all the steps performed during installation to see what you did and collect them in a document (including static files like configuration ones). Then, write a system script that can periodically backup the files you want to a external (ideally) destination. This would probably be only the database.

Cheers.

3 Likes