'Restore Vectorial Data from DB'

def restore_geoserver_vector_data(self, config, settings, target_folder):

    if config.gs_dump_vector_data:
        gs_data_folder = os.path.join(target_folder, 'gs_data_dir', 'data', 'geonode')
        if (not os.path.exists(gs_data_folder)):
            print ('Skipping    geoserver    vector    data    restore:    ' + 'directory    "{}"    not    found.'.format(gs_data_folder))
            return
        datastore = settings.OGC_SERVER['default']['DATASTORE']
        if datastore:
            ogc_db_name = settings.DATABASES[datastore]['NAME']
            ogc_db_user = settings.DATABASES[datastore]['USER']
            ogc_db_passwd = settings.DATABASES[datastore]['PASSWORD']
            ogc_db_host = settings.DATABASES[datastore]['HOST']
            ogc_db_port = settings.DATABASES[datastore]['PORT']
            helpers.restore_db(config, ogc_db_name, ogc_db_user, ogc_db_port, ogc_db_host, ogc_db_passwd, gs_data_folder)
