4.7. Miscellaneous Tasks

4.7.1. Setting the Backup Limit

By default, each user can create up to 3 backups of each of their virtual environments. To change the default backup amount for both new and existing VEs, do the following on the controller:

  1. Set the backup_default_max parameter in the [DEFAULT] section of the configuration template /usr/share/vzapi-installer/roles/api/templates/vzapi.conf.j2. For example:

    [DEFAULT]
    <...>
    backup_default_max = 5
    <...>
    

    This will apply the change to new VEs on compute nodes that will be added to Virtuozzo PowerPanel in the future.

  2. Run vzapi-installer computes to redeploy existing compute nodes and apply the change to new VEs that will be created on them. For more details on this command, see Deploying Compute Nodes.

  3. Apply the change to existing VEs. For example:

    # mysql vzapi --execute="UPDATE instances SET backup_limit=5;"
    

Note

The backup directory (/vz/vmprivate/backups by default) can be changed with the prlsrvctl set --backup-path <path> command.

To set the default backup limit for an individual VE with the ID <VE_UUID>, use the following command:

# vzapi instance update --backup-limit 5 <VE_UUID>

Note

If MFA is enabled, replace vzapi <cmd> with vzapi --os-cloud local-credential <cmd>. For more details, see Managing Multi-Factor Authentication.

4.7.2. Setting the Default Backup Mode

By default, a full backup is created first and then only incremental backups are created (see full_and_incremental further). To change the default backup mode for both new and existing VEs, do the following on the controller:

  1. Set the backup_default_mode parameter in the [DEFAULT] section of the configuration template /usr/share/vzapi-installer/roles/api/templates/vzapi.conf.j2.

    The following modes are available:

    • always_full, always create full backups.

    • always_incremental, create a full backup first, then only create incremental backups unless the full or the last incremental backup is deleted. If a mid-chain incremental backup is deleted, it is merged with the next one in the chain, increasing its size accordingly.

    • full_and_incremental, create a full backup first, then only create incremental backups unless the full backup is deleted. If a mid-chain incremental backup is deleted, the subsequent backups are deleted as well, and the next backup is a full one again.

    For example:

    [DEFAULT]
    <...>
    backup_default_mode = always_full
    <...>
    

    This will apply the change to new VEs on compute nodes that will be added to Virtuozzo PowerPanel in the future.

  2. Run vzapi-installer computes to redeploy existing compute nodes and apply the change to new VEs that will be created on them. For more details on this command, see Deploying Compute Nodes.

  3. Apply the change to existing VEs. For example:

    # mysql vzapi --execute="UPDATE instances SET backup_mode='always_full';"
    

To set the default backup mode for an individual VE with the ID <VE_UUID>, use the following command:

# vzapi instance update --backup-mode always_full <VE_UUID>

Note

If MFA is enabled, replace vzapi <cmd> with vzapi --os-cloud local-credential <cmd>. For more details, see Managing Multi-Factor Authentication.

4.7.3. Setting the Idle Timeout

By default, users are automatically logged out of Virtuozzo PowerPanel after 24 hours of inactivity. You can change this default value by setting the expiration parameter (in seconds) in the [token] section in the file /etc/keystone/keystone.conf. For example:

[token]
<...>
expiration = 43200
<...>

Restart the Apache HTTP Server to apply the change:

# systemctl restart httpd