---
title: 'API - Interaction with Backup | Zomro'
description: 'This guide describes how to create, view existing, and delete backups using the API'
image: 'https://dx86q6oq7ry0e.cloudfront.net/uploads/blog/a54%40server-panel.net/2024/07/23/screenshot-from-2024-07-23-15-31-16_q50.jpg'
---

![opened image]()

  * [Zomro](https://zomro.com/)
  * [Useful articles](https://zomro.com/blog/articles/)
  * API - Interaction with Backup 



# API - Interaction with Backup

23-07-2024

This document describes the process of creating, viewing, and deleting backups for an instance using the Zomro service API. The provided request examples will help you quickly understand the basic operations needed to manage backups through the API.

## **Creating a Backup**

To create a backup, execute the following request:

URL: 
    
    
    https://api.zomro.com/

Method: POST

Request Body (Form-data):

Parameter | Example Value | Required Parameter | Value Description  
---|---|---|---  
func | instances.fleio_bckps.edit | Yes | Function to create a backup  
auth | 21fc199...c43f71 | No | Session token. This is one of the authorization options. More details on other options are described [here](https://ispsystem.com/docs/b6c/developer-section/working-with-api/guide-to-ispsystem-software-api)  
out | json | Yes | Response type to expect  
sok | ok | Yes | Operation confirmation  
plid | 5203773 | Yes | ID of the instance for which to create a backup  
name | MyBackup | Yes | Backup name  
  
Example of creating a backup for a service

For example, we use the service:

![API - Interaction with Backup - 1](https://dx86q6oq7ry0e.cloudfront.net/uploads/blog/a54%40server-panel.net/2024/07/23/screenshot-from-2024-07-23-15-31-16_q50.jpg)

URL: 
    
    
    https://api.zomro.com/

Method: POST

Request Body (Form-data):

Parameter | Value  
---|---  
func | instances.fleio_bckps.edit  
auth | 21fc199...c43f71  
out | json  
sok | ok  
plid | 5203773  
name | MyBackup  
  
Here is an example of a request that can be executed from the console:
    
    
    curl --location 'https://api.zomro.com/' \
    --form 'func="instances.fleio_bckps.edit"' \
    --form 'auth="d3ec30e337e01078a1d185cc"' \
    --form 'out="json"' \
    --form 'sok="ok"' \
    --form 'plid="5203773"' \
    --form 'name="MyBackup"'

After executing the request, we see that the backup is in the process of being created. As we can see, the backup has the status Saving:

![API - Interaction with Backup - 2](https://dx86q6oq7ry0e.cloudfront.net/uploads/blog/a54%40server-panel.net/2024/07/23/screenshot-from-2024-07-23-15-33-09_q50.jpg)​​​​​​​

After the backup creation is complete, the backup status will change from Saving to Active:

![API - Interaction with Backup - 3](https://dx86q6oq7ry0e.cloudfront.net/uploads/blog/a54%40server-panel.net/2024/07/23/screenshot-from-2024-07-23-15-37-40_q50.jpg)

As we can see, the service status is Active.

## **How to Get a List of Backups Using the API**

## 

Also, using the API, you can get a list of backups. To do this, execute the following request format:

URL: 
    
    
    https://api.zomro.com/

Method: POST

Request Body (Form-data):

Parameter | Example Value | Required Parameter | Value Description  
---|---|---|---  
func | instances.fleio_bckps | Yes | Function to get all backups  
auth | 21fc199...c43f71 | No | Session token. This is one of the authorization options. More details on other options are described [here](https://ispsystem.com/docs/b6c/developer-section/working-with-api/guide-to-ispsystem-software-api)  
out | json | Yes | Response type to expect  
plid | 5203773 | Yes | ID of the instance whose backups are to be retrieved  
  
For example, let's try to get backups for service 5203773. In the previous step, we created 1 backup. Let's try to retrieve it.

Let's try to execute the following request in the console:
    
    
    curl --location 'https://api.zomro.com/' \
    --form 'func="instances.fleio_bckps"' \
    --form 'auth="8409b4eea786e3cad35eacf7"' \
    --form 'out="json"' \
    --form 'elid="5203773"'

We get the following result:
    
    
    {
        "doc": {
            ...
            "elem": [
                {
                    "architecture": {
                        "$": "x86_64"
                    },
                    "backup_type": {
                        "$": "manual"
                    },
                    "createdate": {
                        "$": "2024-07-23"
                    },
                    "disk_format": {
                        "$": "qcow2"
                    },
                    "fleio_id": {
                        "$": "b26c0f34-48b2-4cb2-b4eb-388eac959df6"
                    },
                    "fleio_status": {
                        "$": "Active"
                    },
                    "hypervisor_type": {
                        "$": "any_hypervisor"
                    },
                    "id": {
                        "$": "5203980"
                    },
                    "image_size": {
                        "$": "3"
                    },
                    "item_real_status": {
                        "$": "2"
                    },
                    "min_disk": {
                        "$": "20"
                    },
                    "min_ram": {
                        "$": "0"
                    },
                    "name": {
                        "$": "MyBackup"
                    },
                    "os_distro": {
                        "$": "Ubuntu"
                    },
                    "os_version": {
                        "$": "22.04 x64"
                    },
                    "protected": {
                        "$": "off"
                    },
                    "region": {
                        "$": "Netherlands-2"
                    },
                    "visibility": {
                        "$": "private"
                    }
                }
            ],
        }
    }

We are interested in the data obtained in the following nesting:​​​​​​​
    
    
    doc.elem.[]

From this response, we get the following data:

Field Name | Description  
---|---  
architecture | Virtual machine architecture  
backup_type | How the backup was created: Manually or on schedule  
createdate | Backup creation time  
disk_format | Backup file type  
fleio_id | Unique UUID in the fleio system  
fleio_status | Backup status. The value Active means the backup is created  
hypervisor_type | Hypervisor type for the virtual machine  
id | Backup ID within bill manager  
image_size | Actual backup size. Determined after the backup creation is complete  
item_real_status | Service status within billmanager  
min_disk | Minimum disk size on the server needed to restore this backup  
min_ram | Minimum RAM size on the server needed to restore this backup  
name | Backup name  
os_distro | Operating system name  
os_version | Operating system version  
protected | Indicates whether the backup can be deleted. If "off", the backup can be deleted. If "on", the backup cannot be deleted.  
region | Data center name where the backup is located  
visibility | Backup access status. The only available value is "Private"  
  
## **How to Delete a Backup**

**​​​​​​​**

To delete a backup, execute the following request:

URL: 
    
    
    https://api.zomro.com/

Method: POST

Request Body (Form-data):

ID of the instance whose backups are to be retrieved

Parameter | Example Value | Required Parameter | Value Description  
---|---|---|---  
func | image.delete | Yes | Function to delete a backup  
auth | 21fc199...c43f71 | No | Session token. This is one of the authorization options. More details on other options are described [here](https://ispsystem.com/docs/b6c/developer-section/working-with-api/guide-to-ispsystem-software-api)  
out | json | Yes | Response type to expect  
plid | 5203773 | Yes  
elname |  5203980 | Yes | ID of the backup to be deleted  
elid |  5203980 | Yes | ID of the backup to be deleted  
sok | ok | Yes | Operation confirmation  
  
Let's try to execute the following request in the console:
    
    
    curl --location 'https://api.zomro.com/' \
    --form 'func="image.delete"' \
    --form 'auth="72307c8cfc94e631d835438f"' \
    --form 'out="json"' \
    --form 'sok="ok"' \
    --form 'plid="5203773"' \
    --form 'elname="5203980"' \
    --form 'elid="5203980"'

After executing the request, you can check the result using the "instances.fleio_bckps" function or by viewing it through the web interface:

![API - Interaction with Backup - 4](https://dx86q6oq7ry0e.cloudfront.net/uploads/blog/a54%40server-panel.net/2024/07/23/screenshot-from-2024-07-23-15-38-37_q50.jpg)​​​​​​​

As we can see, the backup was successfully deleted. 

We also suggest studying articles that may be useful for interacting with [Cloud VPS](https://zomro.com/vps) products using the API:

  * [_API - Creating a Service_](https://zomro.com/blog/articles/462-api-creation-of-a-service)
  * [_API - Obtaining Information About Available Tariffs and Their Parameters_](https://zomro.com/blog/articles/464-api-obtaining-information-about-available-tariffs-and-their-parameters)
  * [_API - Operation Start & Stop_](https://zomro.com/blog/articles/468-api-operation-start-and-stop)
  * [_API - Operation Reboot_](https://zomro.com/blog/articles/465-api-operation-reboot)
  * [_API - Operation Rebuild_](https://zomro.com/blog/articles/466-api-operation-rebuild)
  * [_API - Operation Delete_](https://zomro.com/blog/articles/467-api-operation-delete)
  * [_API - Interaction with Image_](https://zomro.com/blog/faq/487-api-interaction-with-image)
  * [_API - Interaction with Backup Schedule_](https://zomro.com/blog/faq/486-api-interaction-with-backup-schedule)
  * [_API - Interaction with Rescue_](https://zomro.com/blog/faq/485-api-interacting-with-rescue)​​​​​​​
  * [_API - Interaction with Snapshots_](https://zomro.com/blog/faq/483-api-interacting-with-snapshots)
  * [_API - Interaction with Boot From ISO_](https://zomro.com/blog/faq/484-api-interacting-with-boot-from-iso)



Similar articles:

[API - Retrieving information about available rates and their parameters](https://zomro.com/blog/articles/464-api-obtaining-information-about-available-tariffs-and-their-parameters) [Reliable adult hosting for your project](https://zomro.com/blog/articles/506-reliable-adult-hosting-for-your-project) [How to choose the best tariff plan for your virtual server (VPS)](https://zomro.com/blog/articles/521-how-to-choose-the-best-hosting-plan-for-your-virtual-private-server) [How to choose the best hosting for your business](https://zomro.com/blog/articles/340-how-to-choose-the-best-hosting-for-your-business) [What is the purpose of a Samba server?](https://zomro.com/blog/articles/528-what-is-a-samba-server-for)

[ Premium Cloud VPS from €7.95/mon ](/vps)
