diff --git a/ipaserver/install/ipa_restore.py b/ipaserver/install/ipa_restore.py index 48b95ed18..1916d3063 100644 --- a/ipaserver/install/ipa_restore.py +++ b/ipaserver/install/ipa_restore.py @@ -607,10 +607,13 @@ class Restore(admintool.AdminTool): logger.info("Waiting for LDIF to finish") wait_for_task(conn, dn) else: + template_dir = paths.VAR_LOG_DIRSRV_INSTANCE_TEMPLATE % instance try: - os.makedirs(paths.VAR_LOG_DIRSRV_INSTANCE_TEMPLATE % instance) + os.makedirs(template_dir) except OSError as e: pass + # Restore SELinux context of template_dir + tasks.restore_context(template_dir) args = [paths.LDIF2DB, '-Z', instance,