DHIS2 Restore DB issues

Hello everyone

Suspecting configuration issues on the DHIS2 Instance, we tried to create another instance based on a old backup. Based on the screenshot bellow, it look like the database restore worked well, but if we look closely we’re going to notice that there are less COPY lines as usual. When I check using SQL Select command in the new DB I notice that there is no data in datavalue, trackedentityinstance, programinstance, programstageinstance tables, I only found data in the audit table.

I’m so worry about that, because it maybe mean that our backups are not good (complete).

We’re using DHIS2 ng-tools, here is backup conf from /usr/local/etc/dhis/dhis2-env

Here is some stats on the our prod instance, it show that there is a lot of data on the database.

So, We don’t know why the restore process doesn’t work.

Regards;

I did a new backup by excluding data from audit table and notice that the difference on the size of backup files is crasy. With audit data, the backup file is about 51GB and without the audit data it’s about 4GB.

With this new backup I was able to create a new instance successfully

1 Like

Thank you for sharing the solution @didate !

Based on the snapshot you provided, it seems that the audit table is the largest, at around 89GB. I suspect that the initial backup might have been corrupted or incomplete, especially considering it included the audit table, causing delays during the backup process.

1 Like