Using db.import_from_csv_file(...) to restore a complete database from a file created using db.export_to_csv_file(...) used to work.
With 2.8.2 the process (at least in the development environment - I haven't tried in production environment) loops forever.
The problem seems to be in gluon\dal.py at line 8414 (#if id_map ...)
def import_from_csv_file(self, ifile, id_map=None, null='<NULL>',
unique='uuid', map_tablenames=None,
ignore_missing_tables=False,
*args, **kwargs):
#if id_map is None: id_map={}
id_offset = {} # only used if id_map is None
Uncommenting this line to initialize id_map seems to fix the problem ... don't know why it was commented out, perhaps this breaks some other case?