./manage.py dumpdata --exclude=contenttypes --natural-foreign --natural-primary > datadump.json
Change database setting to postgresql configurations replacing values correctly
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': '<DATABASE_NAME>',
'USER': '<DATABASE_USER>',
'PASSWORD': '<DATABASE_USER_PASSWORD>',
'HOST': '<DATABASE_HOST>',
'PORT': <DATABASE_PORT>,
}
}
./manage.py makemigrations
./manage.py migrate
./manage.py loaddata datadump.json