pool.export
===========

Export pool of `id`.

`cascade` will delete all attachments of the given pool (`pool.attachments`). `restart_services` will restart services that have open files on given pool. `destroy` will also PERMANENTLY destroy the pool/data.

.. examples(websocket)::

  Export pool of id 1.

    :::javascript
    {
        "id": "6841f242-840a-11e6-a437-00e04d680384",
        "msg": "method",
        "method": "pool.export,
        "params": [1, {
            "cascade": true,
            "destroy": false
        }]
    }

If this is an HA system and failover is enabled and the last zpool is exported/disconnected, then this will raise EOPNOTSUPP. Failover must be disabled before exporting the last zpool on the system.

This method is a job.

.. raw:: html

    <div id="json-schema">
    <span class="badge badge-dark value-type">Type: object</span><br/>
    <div class="accordion" id="accordionCall_parameters">
    <div class="card">
    <div class="card-header" id="headingCall_parameters">
    <h2 class="mb-0">
    <button aria-controls="Call_parameters" aria-expanded="" class="btn btn-link property-name-button" data-target="#Call_parameters" data-toggle="collapse" onclick="setAnchor('#Call_parameters')" type="button"><span class="property-name">Call parameters</span></button>
    </h2>
    </div>
    <div aria-labelledby="headingCall_parameters" class="collapse property-definition-div" data-parent="#accordionCall_parameters" id="Call_parameters">
    <div class="card-body pl-5">
    <span class="badge badge-dark value-type">Type: array</span><br/>
    <span class="badge badge-info no-additional">No Additional Items</span><h4>Tuple Validation</h4>
    <h5>Parameter 1: id</h5>
    <div class="card">
    <div class="card-body items-definition" id="Call_parameters_items_i0">
    <h4>id</h4><span class="badge badge-dark value-type">Type: integer</span><br/>
    <span class="description"><p>ID of the pool to export.</p>
    </span>
    </div>
    </div>
    <h5>Parameter 2: options</h5>
    <div class="card">
    <div class="card-body items-definition" id="Call_parameters_items_i1">
    <h4>options</h4><span class="badge badge-dark value-type">Type: object</span><br/>
    <span class="description"><p>Options for controlling the pool export process.</p>
    </span> <span class="badge badge-info no-additional">No Additional Properties</span>
    <div class="accordion" id="accordionCall_parameters_items_i1_cascade">
    <div class="card">
    <div class="card-header" id="headingCall_parameters_items_i1_cascade">
    <h2 class="mb-0">
    <button aria-controls="Call_parameters_items_i1_cascade" aria-expanded="" class="btn btn-link property-name-button" data-target="#Call_parameters_items_i1_cascade" data-toggle="collapse" onclick="setAnchor('#Call_parameters_items_i1_cascade')" type="button"><span class="property-name">cascade</span></button>
    </h2>
    </div>
    <div aria-labelledby="headingCall_parameters_items_i1_cascade" class="collapse property-definition-div" data-parent="#accordionCall_parameters_items_i1_cascade" id="Call_parameters_items_i1_cascade">
    <div class="card-body pl-5">
    <h4>Cascade</h4><span class="badge badge-dark value-type">Type: boolean</span> <span class="badge badge-success default-value">Default: false</span><br/>
    <span class="description"><p>Delete all attachments of the given pool (<code>pool.attachments</code>).</p>
    </span>
    </div>
    </div>
    </div>
    </div>
    <div class="accordion" id="accordionCall_parameters_items_i1_restart_services">
    <div class="card">
    <div class="card-header" id="headingCall_parameters_items_i1_restart_services">
    <h2 class="mb-0">
    <button aria-controls="Call_parameters_items_i1_restart_services" aria-expanded="" class="btn btn-link property-name-button" data-target="#Call_parameters_items_i1_restart_services" data-toggle="collapse" onclick="setAnchor('#Call_parameters_items_i1_restart_services')" type="button"><span class="property-name">restart_services</span></button>
    </h2>
    </div>
    <div aria-labelledby="headingCall_parameters_items_i1_restart_services" class="collapse property-definition-div" data-parent="#accordionCall_parameters_items_i1_restart_services" id="Call_parameters_items_i1_restart_services">
    <div class="card-body pl-5">
    <h4>Restart Services</h4><span class="badge badge-dark value-type">Type: boolean</span> <span class="badge badge-success default-value">Default: false</span><br/>
    <span class="description"><p>Restart services that have open files on given pool.</p>
    </span>
    </div>
    </div>
    </div>
    </div>
    <div class="accordion" id="accordionCall_parameters_items_i1_destroy">
    <div class="card">
    <div class="card-header" id="headingCall_parameters_items_i1_destroy">
    <h2 class="mb-0">
    <button aria-controls="Call_parameters_items_i1_destroy" aria-expanded="" class="btn btn-link property-name-button" data-target="#Call_parameters_items_i1_destroy" data-toggle="collapse" onclick="setAnchor('#Call_parameters_items_i1_destroy')" type="button"><span class="property-name">destroy</span></button>
    </h2>
    </div>
    <div aria-labelledby="headingCall_parameters_items_i1_destroy" class="collapse property-definition-div" data-parent="#accordionCall_parameters_items_i1_destroy" id="Call_parameters_items_i1_destroy">
    <div class="card-body pl-5">
    <h4>Destroy</h4><span class="badge badge-dark value-type">Type: boolean</span> <span class="badge badge-success default-value">Default: false</span><br/>
    <span class="description"><p>PERMANENTLY destroy the pool/data.</p>
    </span>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    <div class="accordion" id="accordionReturn_value">
    <div class="card">
    <div class="card-header" id="headingReturn_value">
    <h2 class="mb-0">
    <button aria-controls="Return_value" aria-expanded="" class="btn btn-link property-name-button" data-target="#Return_value" data-toggle="collapse" onclick="setAnchor('#Return_value')" type="button"><span class="property-name">Return value</span></button>
    </h2>
    </div>
    <div aria-labelledby="headingReturn_value" class="collapse property-definition-div" data-parent="#accordionReturn_value" id="Return_value">
    <div class="card-body pl-5">
    <h4>Result</h4><span class="badge badge-dark value-type">Type: null</span><br/>
    <span class="description"><p>Returns <code>null</code> on successful pool export.</p>
    </span>
    </div>
    </div>
    </div>
    </div>
    </div><br><br>

*Required roles:* POOL_WRITE

