# The `api/db/<dbname>/backup/control` Resource

> The `api/db/<dbname>/backup/control` resource implements the asynchronous backup and restore control.

> ### For an overview see page eXtremeDB Web Service Resources

> With the REST server started (listening on port 8083), the following http request will execute one of the backup or restore start or stop operations depending on the JSON object passed:

>         http://localhost:8083/api/db/diskdb/backup/control

> The request body is a JSON object. The desired action and its parameters are specified within this object.

> Supported actions and their parameters are specified below. These actions call the corresponding C API functions. Hence, the same limitations and caveats apply. For the detailed descriptions of the actions and parameters, see the documentation pages for the corresponding asynchronous backup C API functions (``mco_async_backup_start()``,``mco_async_backup_stop()``, `mco_async_restore_start()`, and `mco_async_restore_stop()`).

> The parameters are optional unless specified otherwise below:

> backup_start | Start the asynchronous backup process Parameters:
> file_name | string (required)
> backup_cycle_delay_msec | integer (default: 0)
> label | string (default: none)
> type | `AUTO`, `SNAPSHOT`, or `INCREMENTAL` (default: `AUTO`)
> compression_level | integer (default: 0)
> cipher | string (default: none)
> backup_stop | Stop the asynchronous backup process Parameter:
> force | boolean (default: false)
> restore_start | Start the asynchronous restore process Parameters:
> file_name | string (required)
> label | string (default: none)
> cipher | string (default: none)
> restore_stop | Stop the asynchronous restore process Parameter:
> force | boolean (default: false)

> ### Examples

> Starting the asynchronous backup process (note that some of the optional parameters are missing and hence assume the default values):

>         {
>           "action":                  "backup_start",
>           "file_name":               "database.bkp",
>           "label":                   "my_label",
>           "backup_cycle_delay_msec":  1000
>         }

> Stopping the asynchronous backup process gracefully (`force` is set to false by default):

>         {
>           "action":  "backup_stop"
>         }

> It is possible, although not required, to explicitly set the force parameter to false:

>         {
>           "action":  "backup_stop"
>           "force": false
>         }