﻿---
title: Exporting and importing machine learning jobs
description: In Kibana, you can export and import your machine learning job and datafeed configuration details in Stack Management > Machine Learning Jobs. For example,...
url: https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/4242/explore-analyze/machine-learning/anomaly-detection/move-jobs
products:
  - Machine Learning
---

# Exporting and importing machine learning jobs
In Kibana, you can export and import your machine learning job and datafeed configuration details in **Stack Management > Machine Learning Jobs**. For example, you can export jobs from your test environment and import them into your production environment.
The exported file contains configuration details; it does not contain the machine learning models. For anomaly detection, you must import and run the job to build a model that is accurate for the new environment. For data frame analytics, trained models are portable and can be transferred between clusters as described in [Exporting and importing models](/elastic/docs-content/pull/4242/explore-analyze/machine-learning/data-frame-analytics/ml-trained-models#export-import).
There are some additional actions that you must take before you can successfully import and run your jobs:
1. The Kibana [data views](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/4242/explore-analyze/find-and-organize/data-views) that are used by anomaly detection datafeeds and data frame analytics source indices must exist; otherwise, the import fails.
2. If your anomaly detection jobs use [custom rules](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/4242/explore-analyze/machine-learning/anomaly-detection/ml-configuring-detector-custom-rules) with filter lists, the filter lists must exist; otherwise, the import fails. To create filter lists, use Kibana or the [create filters API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-filter).
3. If your anomaly detection jobs were associated with [calendars](/elastic/docs-content/pull/4242/explore-analyze/machine-learning/anomaly-detection/ml-ad-run-jobs#ml-ad-calendars), you must create the calendar in the new environment and add your imported jobs to the calendar. Use Kibana or the [create calendars](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-calendar), [add events to calendar](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-post-calendar-events), and [add jobs to calendar](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-calendar-job) APIs.