VMmanager Knowledge Base

How to change the timeout for backup tasks?

This article provides instructions for editing the following:

  •     time waiting for free space to create a backup;
  •     timeout for the entire backup task.

Time waiting for free space to create a backup

When creating a backup, the platform makes a snapshot of the virtual machine (VM) and moves the information from it to the cluster node. VMmanager checks if the cluster node has enough free space before moving. If there is not enough space, VMmanager waits for 180 minutes for space to appear. If the space does not become available during this time, VMmanager cancels the task.

In some cases it may be necessary to increase the waiting time for free space, for example, when creating a large number of backup tasks.

Note
  1. The method described in this article requires restarting the main VMmanager container. Make sure that there are no running tasks in the platform.
  2. When the platform is updated, the timeout value will be reset to the default value.

To change the timeout for waiting for free space:

  1. Connect to the server with VMmanager via SSH with superuser permissions.
  2. Specify the timeout value in the file /opt/ispsystem/vm/docker-compose.yaml. In order to do this, you need to add the BACKUP_CREATE_TIMEOUT parameter into the environment section of vm_box container. The value of the parameter is specified in seconds. E.g., BACKUP_CREATE_TIMEOUT: 18000 increases the waiting time to five hours.

    A fragment of docker-compose.yaml file
    vm_box:
        container_name: vm_box
        image: docker-registry.ispsystem.com:5000/team/vm/box:6.10.0
        volumes:
        - /opt/ispsystem/vm/backup:/opt/ispsystem/vm/backup
        - /opt/ispsystem/vm/socket/:/opt/ispsystem/vm/vmbox/
        environment:
          BACKUP_CREATE_TIMEOUT: 18000
          CONSUL_PORT_8500_TCP_ADDR: consul
          GARFANA_PROXY_HEADER_NAME: X-GRAFANA-AUTH
          KV_STORAGE_ADDR: consul
    
  3. Restart vm_box container:

    vm start

Timeout for the entire backup task

To edit the timeout value for the backup creation task:

  1. Get an authorization token:

    curl -k -X POST -H "accept: application/json" -H "Content-Type: application/json" 'https://domain.com/auth/v4/public/token' -d '{"email": "admin_email", "password": "admin_pass"}'
    Comments to the command

    In response, you will get the message in the form:

    Example of response in JSON
    {
      "confirmed": true,
      "expires_at": null,
      "id": "6",
      "token": "4-e9726dd9-61d9-2940-add3-914851d2cb8a"
    }

    Save the received token value.

  2. Execute the request:

    curl -H "x-xsrf-token: <token>" "https://domain.com/vm/v3/settings/task/disk_backup/timeout" -d '{"timeout_seconds": <seconds>}'
    Comments