dhis2-users team mailing list archive
-
dhis2-users team
-
Mailing list archive
-
Message #06911
Cross database querying for updating data
Can I safely update DHIS2 database A with data from DHIS database B both on
the same PostgreSQL server by cross query. B is backup of A
>From database B, I can retrieve and save the data that is required using:
psql B -c "\copy (select * from datavalue where periodid='xxxx') TO
STDOUT" > /tmp/data.tsv;
And to restore:
psql A -c "\copy datavaue (x, y, z, ...) FROM /tmp/data.tsv"
Is this recommended, and what else should be cross transferred.
Follow ups