+ inf.set(DATE_AND_AUTHOR_INF_SECTION, 'file-name', "%s.tar.gz" % fname)
+ inf.set(DATE_AND_AUTHOR_INF_SECTION, 'author', unicode(user.id))
+ inf.set(DATE_AND_AUTHOR_INF_SECTION, 'site', djsettings.APP_URL)
+ inf.set(DATE_AND_AUTHOR_INF_SECTION, 'started', start_time.strftime(DATETIME_FORMAT))
+ inf.set(DATE_AND_AUTHOR_INF_SECTION, 'finished', now.strftime(DATETIME_FORMAT))
+
+ inf.add_section(OPTIONS_INF_SECTION)
+ inf.set(OPTIONS_INF_SECTION, 'anon-data', str(options.get('anon_data', False)))
+ inf.set(OPTIONS_INF_SECTION, 'with-upfiles', str(options.get('uplodaded_files', False)))
+ inf.set(OPTIONS_INF_SECTION, 'with-skins', str(options.get('import_skins_folder', False)))
+
+ inf.add_section(META_INF_SECTION)
+
+ for id, s in state.items():
+ inf.set(META_INF_SECTION, id, str(s['count']))
+
+ with open(os.path.join(tmp, 'backup.inf'), 'wb') as inffile:
+ inf.write(inffile)
+
+ t.add(os.path.join(tmp, '/backup.inf'), arcname='backup.inf')
+ state['overall']['status'] = _('Saving backup file')
+ set_state()