How to upload dhis2 backup database in ubuntu server?


How to upload dhis2 backup database in server?

1. Login into your root access in ubuntu server and create database: 

sudo -u postgres createdb -O dhis amr2

2. Upload your backup database into your preferred location and run the below command: 

sudo -u postgres psql amr2  < '/home/dhis/amr.sql'
// sudo -u postgres psql your_db_name  < 'your_file_location/your_db.sql'