CLI Reference

Overview

Every node provides CLI that can be used to manage configuration and invoke tasks on vProtect Node. All of the commands are executed using vprotect command. The general syntax is as shown below:
1
[[email protected] ~]# vprotect
2
usage: vprotect <COMMAND> -<ARG_1> ... -<ARG_N>
3
COMMAND is one of the following:
4
node Node management
5
config Node configuration management
6
hv Hypervisor management
7
hvm Hypervisor manager management
8
hc Hypervisor cluster management
9
hs Hypervisor storage management
10
vm Virtual machine management
11
vmpolicy VM backup policy management
12
bd Backup destination management
13
sched Schedule management
14
brvm VM backup & restore
15
st Storage management
16
stpool Storage pool management
17
stprovider Storage provider management
18
brapp Application backup & restore
19
mnt Mounted backup management
20
task Task management
21
login User login
22
logout Node and user logout
23
stop Safely stops node
24
vm-snappolicy Snapshot policy management for VMs
25
storage-snappolicy Snapshot policy management for storages
26
app Application backup management
27
appconf App command execution management
28
apppolicy Application backup policy management
29
restorejob Restore jobs
30
recplan Recovery plan policies
31
brst Storage backup & restore
32
quota Quota management
33
project Project management
34
user User management
35
rbac Rbac management
36
role AppUser Role management
37
group AppUser Group management
38
status Shows node status
39
start Starts node
Copied!

Starting and stopping node

  • To check if vProtect Node is running, run:
    1
    systemctl status vprotect-node
    Copied!
    or
    1
    vprotect status
    Copied!
  • To start vProtect Node run:
    1
    systemctl start vprotect-node
    Copied!
    or
    1
    vprotect start
    Copied!
  • To safely stop vProtect Node (this command waits for all tasks to be cancelled, so that temporary objects are cleaned up) run:
    1
    systemctl stop vprotect-node
    Copied!
    or
    1
    vprotect stop
    Copied!
  • In emergency cases you may need to kill the engine without task clean up - get PID of the node by running:
    1
    vprotect status
    Copied!
    and kill process using:
    1
    kill <PID>
    Copied!

User login

  • To log in to CLI use the following command:
    1
    vprotect login -u USER_NAME
    Copied!
where USER_NAME is your admin account in vProtect. You will be prompted for password. From this moment you are able execute commands.
  • Once you completed working with CLI, you can log out by running:
    1
    vprotect logout -u
    Copied!

Note about GUIDs

All of the commands require GUID of the object that you want to refer to in command. GUID is found in the first column of typical list command, e.g.:
  1. 1.
    Let's list VMs and get VM GUID:
    1
    [[email protected] ~]# vprotect vm -l
    2
    GUID Name Hypervisor Present VM group Protected Last backup
    3
    ------------------------------------ ----------------------------- ------------------- ------- ----------- --------- ----------------------
    4
    b2555a74-97bb-44e4-9c68-ed1ac2ddffcd Windows 7 (32-bit) xcp-ng.storware.local true PM-T1_Group false 2020-06-03 00:30 (Tue)
    Copied!
  2. 2.
    Now let's show details of the VM:
    1
    [[email protected] ~]# vprotect vm -g b2555a74-97bb-44e4-9c68-ed1ac2ddffcd
    2
    Property Value
    3
    -------------------------------------------- ------------------------------------------------------------
    4
    5
    GUID b2555a74-97bb-44e4-9c68-ed1ac2ddffcd
    6
    Name Windows 7 (32-bit)
    7
    UUID 9a486d85-c5c6-868b-50f4-3b27f4e4f968
    8
    Present true
    9
    HV type CITRIX
    10
    HVM type -
    11
    Inc. backup snapshot Windows 7 (32-bit): 2020-06-15 19:10:22.0 (6626e7d9-0900-4bfa-a961-85f5379b48d4)
    12
    Tags [vPro-Citrix]
    13
    Hypervisor 10.40.0.29 (1048d561-b0f5-4f1d-b558-856b28e0283e)
    14
    HV manager -
    15
    Backups 29
    16
    VM backup policies Citrix Hypervisor | XCP-ng (1f02821f-75f9-433f-9698-5694f130e1df)
    17
    Protected true
    18
    Last backup 2020-06-15 19:10 (Mon)
    19
    Warnings present true
    20
    VM export/import mode INHERIT
    21
    Quiesce/freeze before snapshot false
    22
    SSH host -
    23
    SSH port 22
    24
    SSH user -
    25
    SSH key path -
    26
    Pre-snapshot CMD exec. enabled false
    27
    Pre-snapshot CMD []
    28
    Post-snapshot CMD exec. enabled false
    29
    Post-snapshot CMD []
    30
    Pre-snapshot ignored exit codes -
    31
    Pre-snapshot standard error output handling DONT_IGNORE
    32
    Post-snapshot ignored exit codes -
    33
    Post-snapshot standard error output handling DONT_IGNORE
    Copied!
Note: that UUID is the ID used by hypervisor or HV manager, while GUID is the ID used by vProtect to uniquely identify objects.
Node GUID can be replaced by this keyword to state that action such as restore or mount is going to be run on node where the command is executed from. For instance, to restore backup with given GUID on current node to /vprotect_data:
1
vprotect br -r 2132182d-e9ab-4478-a1db-48222b0e515b this /vprotect_data
Copied!
Similarly, backup destinations can be referred by names. So backup of some VM with given GUID to backup destination with name ISP can be done like this:
1
vprotect br -b b6f96d43-6f55-468f-a7a0-8aa6219fdf4e ISP
Copied!

Nodes

To list or register node use vprotect node sub-command:
1
[[email protected] ~]# vprotect node
2
Incorrect syntax: Missing required option: [-r Register node, -R Check and Register node, -d Delete node, -e Register existing node, -l List nodes]
3
4
usage: node -d <GUID | NAME> | -e <NODE_NAME> <ADMIN_LOGIN> <API_URL> <[PASSWORD]> | -l | -r <NODE_NAME> <ADMIN_LOGIN> <API_URL> <[PASSWORD]> | -R <NODE_NAME> <ADMIN_LOGIN> <API_URL> <[PASSWORD]>
5
Node management
6
-d,--delete <GUID | NAME> Delete node
7
-e,--register-existing <NODE_NAME> <ADMIN_LOGIN> <API_URL> <[PASSWORD]> Register existing node
8
-l,--list List nodes
9
-r,--register <NODE_NAME> <ADMIN_LOGIN> <API_URL> <[PASSWORD]> Register node
10
-R,--check-and-register <NODE_NAME> <ADMIN_LOGIN> <API_URL> <[PASSWORD]> Check and Register node
Copied!

Examples

  • To list all nodes registered
    1
    vprotect node -l
    Copied!
  • Example node registration
    1
    vprotect node -r node1 admin https://localhost:8181/api
    Copied!
  • You may need to re-register node if vProtect Server address changes
    1
    vprotect node -e node1 admin https://localhost:8181/api
    Copied!

Node configurations

Use vprotect config sub-command add/remove backup destinations from node config, list or show details of node configs.
1
[[email protected] ~]# vprotect config
2
Incorrect syntax: Missing argument for option: s
3
4
usage: config -b <CONFIG_GUID> <[BD_GUID|BD_NAME],...,[BD_GUID|BD_NAME]> | -c <NAME> | -d <GUID> | -g <GUID> | -l | -r <CONFIG_GUID> <[BD_GUID|BD_NAME],...,[BD_GUID|BD_NAME]> | -s <GUID> <PROPERTY_NO.> <VALUE | "MAPPING1=VALUE1;MAPPING2=VALUE2">
5
6
Node configuration management
7
-b,--add-backup-destinations <CONFIG_GUID> <[BD_GUID|BD_NAME],...,[BD_GUID|BD_NAME]> Add backup destinations
8
-c,--create <NAME> Create node config
9
-d,--delete <GUID> Delete node config
10
-g,--details <GUID> Show config details
11
-l,--list List node configs
12
-r,--remove-backup-destinations <CONFIG_GUID> <[BD_GUID|BD_NAME],...,[BD_GUID|BD_NAME]> Remove backup destinations
13
-s,--set <GUID> <PROPERTY_NO.> <VALUE | "MAPPING1=VALUE1;MAPPING2=VALUE2"> Modify node config.
Copied!

Setting up parameters for node configuration

In general vprotect config -s <GUID> <PROPERTY_NO.> <VALUE> command sets value of a property with the given number of node configuration with GUID. Property numbers are returned in a detailed view of each node configuration. After you create node configuration, show default values with -g. Then use property numbers (the first number in the property/value line of the detailed view).

Examples

  • To list all node configurations
    1
    vprotect config -l
    2
    3
    GUID Name Default Nodes Backup destinations Modification time
    4
    ------------------------------------ -------------- ------- ----- ------------------- -----------------
    5
    c95fb3cc-e567-11eb-8446-566fc400002d Default Config true 1 1 2021-07-16 11:41
    Copied!
  • To show details of the given node config (by GUID)
    1
    vprotect config -g c95fb3cc-e567-11eb-8446-566fc400002d
    2
    3
    Property Value
    4
    ----------------------------------------------------------- ------------------------------------------------------------
    5
    6
    GUID c95fb3cc-e567-11eb-8446-566fc400002d
    7
    Modification time 2021-07-16 11:41:54
    8
    1. Name Default Config
    9
    2. Default true
    10
    3. Export path /vprotect_data
    11
    4. Import path /vprotect_data/import
    12
    5. Mount path /vprotect_data/mount
    13
    6. Max. backup time diff. [sec.] 60
    14
    7. Keep last backups locally false
    15
    8. Min. free space for export (staging space threshold) [%] 10
    16
    9. Minimal free space for snapshot in bytes 0
    17
    10. Minimal free space for snapshot in percentages 0
    18
    11. Max. no. of inventory synchronization threads 1
    19
    12. Max. no. of export threads 3
    20
    13. Max. no. of export threads 3
    21
    14. Max. no. of export threads per source 2
    22
    15. Max. no. of store threads 3
    23
    16. Max. no. of restore threads 3
    24
    17. Inventory synchronization task timeout [min.] 1h
    25
    18. Export task timeout [min.] 5h
    26
    19. Store task timeout [min.] 5h
    27
    20. Restore task timeout [min.] 1h
    28
    21. Unmount task timeout [min.] 1h
    29
    22. Mount task timeout [min.] 1h
    30
    23. Import task timeout [min.] 1h
    31
    24. Old backups removal task timeout [min.] 1h
    32
    25. Snapshot reversion task timeout [min.] 1h
    33
    26. Old snapshot removal task timeout [min.] 1h
    34
    27. Task snapshot timeout [min.] 1h
    35
    28. Max. no. of snapshot threads 5
    36
    29. Max. no. of snapshots threads per source 2
    37
    Backup destinations [backup [FILESYSTEM] (bb0524fe-40a1-4ca3-bbc9-7f0be8ac73cc)]
    Copied!
  • To add backup destination (second GUID) to the given node configuration (first GUID):
    1
    vprotect config -b c95fb3cc-e567-11eb-8446-566fc400002d f27b6018-ce1c-4d67-991e-31d9f4f6662b
    Copied!
    More backup destinations can be added by separating GUIDs with commas.

Backup destinations

Backup destination management module is used to add, remove backup destination (i.e. backup provider instance with retention settings). Backup destination must be assigned the group for scheduler to know where to put backups during automatic backup. For backup on-demand you just need to specify which backup destination should be used.
Backup destinations are assigned to the node configuration. This means that nodes using such configuration are configured to store backups in the selected backup destinations.
Note that backup task will fail if it is not able to assign node bacause given BD is not assigned to the node config of the node that is required be be used for given hypervisor.
To manage backup destinations in the system use vprotect bd sub-command.
1
[[email protected] ~]# vprotect bd
2
Required option: [-r Reinitialize backup destination, -c Create backup destination (type = ["filesystem", "netbackup", "networker", "s3", "swift", "isp", "azure", "gcs", "avamar"]), -s Modify backup destination, -d Delete backup destination, -D Remove old backups, -g Show backup destination details, -l List backup destinations]
3
4
usage: bd -c <NAME> <TYPE> | -d <GUID | NAME> | -D <[GUID | NAME],...,[GUID | NAME]> | -g <GUID | NAME> | -l | -r <[GUID]> | -s <GUID |
5
NAME> <PROPERTY_NO.> <VALUE>
6
Backup destination management
7
-c,--create <NAME> <TYPE> Create backup destination (type = ["filesystem", "netbackup", "networker",
8
"s3", "swift", "isp", "azure", "gcs", "avamar"])
9
-d,--delete <GUID | NAME> Delete backup destination
10
-D,--remove-old-backups <[GUID | NAME],...,[GUID | NAME]> Remove old backups
11
-g,--details <GUID | NAME> Show backup destination details
12
-l,--list List backup destinations
13
-r,--reinit <[GUID]> Reinitialize backup destination
14
-s,--set <GUID | NAME> <PROPERTY_NO.> <VALUE> Modify backup destination
Copied!

Setting up parameters for backup destinations

In general vprotect bd -s <GUID> <PROPERTY_NO.> <VALUE> command sets value of property with the given number of BD with GUID. Property numbers are returned in detailed view of each BD (fields obviously are different for each backup provider). After you create backup destination, show default values with -g. Then use property numbers (first number in the property/value line of the detailed view).
Retention time settings are in interpreted in days (just give number without any additional suffixes).
There are however some mode/type fields which require string to be typed in correct format:
  1. 1.
    Amazon S3 - Backup mode - must be either:
    • SINGLE_BUCKET - single bucket for all VMs
    • ONE_BUCKET_PER_VM - separate bucket for each VM (note that default limit is 100 buckets in Amazon S3)
  2. 2.
    Swift - Auth method - authentication method used to authenticate Swift BD:
    • BASIC
    • TEMPAUTH
    • KEYSTONE
  3. 3.
    Time zones must be specified in the format shown in this table: List of tz database time zones

Examples

  • To list all backup destinations
    1
    vprotect bd -l
    Copied!
  • To show details of the given HV manager (by GUID) - note that each BD has different set of fields - numbers at the beginning of a line indicate an indentifier of a field you want to set from CLI:
    1
    [[email protected] ~]# vprotect bd -g 3263b196-056e-4485-9e8f-932798b58eb3
    2
    Property Value
    3
    ------------------------------------------------------------ ------------------------------------
    4
    5
    GUID bb0524fe-40a1-4ca3-bbc9-7f0be8ac73cc
    6
    Node configs 1
    7
    Type FILESYSTEM
    8
    Total available space 181 GiB
    9
    Total used space 9,1 GiB
    10
    1. Name backup
    11
    2. Pre-access CMD exec. enabled false
    12
    3. Pre-access CMD []
    13
    4. Post-access CMD exec. enabled false
    14
    5. Post-access CMD []
    15
    6. Default false
    16
    7. Retention (full) - keep last N backups 4
    17
    8. Retention (full) - keep newer than 30d
    18
    9. Retention (inc.) - keep last N backups 30
    19
    10. Retention (inc.) - keep newer than 30d
    20
    11. Paths [/backup]
    21
    12. Deduplication enabled false
    22
    13. Deduplication device -
    23
    14. Deduplicated filesystem mount point (set as 'default' to use BD path) /backup
    24
    15. Deduplication volume used space threshold percentage -
    25
    16. Encryption enabled
    Copied!
  • Remember that to use a BD you need to create a new entry of a given typ and then configure its properties (example for IBM Spectrum Protect [ISP], assume that GUID returned by first command was bb74ef6c-f6de-4783-bfa7-70fc2376fb08 ):
    1
    [[email protected] vprotect]# vprotect bd -c MyTSM isp
    2
    [[email protected] ~]# vprotect bd -g bb74ef6c-f6de-4783-bfa7-70fc2376fb08
    3
    Property Value
    4
    ----------------------------------------- ------------------------------------
    5
    6
    GUID bb74ef6c-f6de-4783-bfa7-70fc2376fb08
    7
    Node configs 1
    8
    Type ISP
    9
    Total available space -
    10
    Total used space 0 B
    11
    1. Name IBM Spectrum Protect
    12
    2. Pre-access CMD exec. enabled false
    13
    3. Pre-access CMD []
    14
    4. Post-access CMD exec. enabled false
    15
    5. Post-access CMD []
    16
    6. Default false
    17
    7. Retention (full) - keep last N backups 4
    18
    8. Retention (full) - keep newer than 30d
    19
    9. Retention (inc.) - keep last N backups 30
    20
    10. Retention (inc.) - keep newer than 30d
    21
    11. dsm.opt file path /opt/vprotect/dsm.opt
    22
    12. Node name vprotect
    23
    13. Node password ***
    24
    14. Time zone Europe/Sarajevo
    25
    15. Backup progress refresh rate 20
    26
    16. Restore progress refresh rate 20
    Copied!
    Now set the properties:
    • retention - full - 4 versions / 30 days
    • retention - incremental - 28 versions / 30 days
    • ISP node name
    • ISP node password
    • ISP server time zone
    1
    vprotect bd -s c1d7fa34-e558-4a1c-af1f-46e88da7bcf5 2 4
    2
    vprotect bd -s c1d7fa34-e558-4a1c-af1f-46e88da7bcf5 3 30
    3
    vprotect bd -s c1d7fa34-e558-4a1c-af1f-46e88da7bcf5 4 28
    4
    vprotect bd -s c1d7fa34-e558-4a1c-af1f-46e88da7bcf5 5 30
    5
    vprotect bd -s c1d7fa34-e558-4a1c-af1f-46e88da7bcf5 7 vprotect
    6
    vprotect bd -s c1d7fa34-e558-4a1c-af1f-46e88da7bcf5 8 vpr0tectPass
    7
    vprotect bd -s c1d7fa34-e558-4a1c-af1f-46e88da7bcf5 9 Europe/Warsaw
    Copied!

HV managers (oVirt/RHV/Oracle VM/Nutanix/Kubernetes)

Hypervisor manager management module is used to add, remove hypervisor managers (currently only oVirt and RHV managers) and invoke indexing task. Indexing tasks gathers information about hypervisors and VMs running in the managed environment and updates their location if the VM has been moved to the different hypervisor.
To manage HV managers in the system use vprotect hvm sub-command.
Note that if you're using RHV/oVirt/Oracle VM/Nutanix/Kubernetes then hypervisors will be detected automatically as a part of index task. So there is no need to define every hypervisor manually as they will be detected automatically.
1
[[email protected] ~]# vprotect hvm
2
Incorrect syntax: Missing required option: [-c Create hypervisor manager (type = ["rhev", "rhv", "ovm", "nutanix", "openstack"]), -d Delete hypervisor manager, -e Set export/import mode for HV manager, -g Show HV manager details, -l List hypervisor managers, -L List hypervisors managed by hypervisor manager, -m Modify hypervisor manager, -n Set node config for hypervisor, -sC Modify hypervisor manager configuration, -s Index inventory on hypervisor manager, -u Set user/password or access key/secret key, -V List VMs managed by hypervisor manager, -sK Set SSH key path]
3
4
usage: hvm -c <URL | ACCOUNT_ID> <TYPE> | -d <GUID | HOST> | -e <GUID | HOST> <DEFAULT|DISK_ATTACHMENT|DISK_IMAGE_TRANSFER|SSH_TRANSFER> | -g <GUID | HOST> | -l | -L <GUID | HOST> | -m <GUID | HOST> <URL> | -n <GUID | HOST> <NODE_CONFIG_GUID | NODE_CONFIG_NAME> | -s <GUID | HOST> |
5
-sC <GUID> <PROPERTY_NO.> <VALUE | "MAPPING1=VALUE1;MAPPING2=VALUE2"> | -sK <GUID> <SSH_KEYPATH> | -u <GUID | HOST> <USER/ACCESS_KEY> <PASSWORD/SECRET_KEY> | -V <GUID | HOST>
6
Hypervisor manager management
7
-c,--create <URL | ACCOUNT_ID> <TYPE> Create hypervisor manager (type = ["rhev", "rhv", "ovm", "nutanix", "openstack"])
8
-d,--delete <GUID | HOST> Delete hypervisor manager
9
-e,--set-export-import-mode <GUID | HOST> <DEFAULT|DISK_ATTACHMENT|DISK_IMAGE_TRANSFER|SSH_TRANSFER> Set export/import mode for HV manager
10
-g,--details <GUID | HOST> Show HV manager details
11
-l,--list List hypervisor managers
12
-L,--list-hvs <GUID | HOST> List hypervisors managed by hypervisor manager
13
-m,--modify <GUID | HOST> <URL> Modify hypervisor manager
14
-n,--set-node-config <GUID | HOST> <NODE_CONFIG_GUID | NODE_CONFIG_NAME> Set node config for hypervisor
15
-s,--sync <GUID | HOST> Index inventory on hypervisor manager
16
-sC,--configuration <GUID> <PROPERTY_NO.> <VALUE | "MAPPING1=VALUE1;MAPPING2=VALUE2"> Modify hypervisor manager configuration
17
-sK,--set-ssh-key-path <GUID> <SSH_KEYPATH> Set SSH key path
18
-u,--credentials <GUID | HOST> <USER/ACCESS_KEY> <PASSWORD/SECRET_KEY> Set user/password or access key/secret key
19
-V,--list-vms <GUID | HOST>
Copied!

Examples

  • To list all hypervisor managers
    1
    vprotect hvm -l
    Copied!
  • To show details of the given HV manager (by GUID)
    1
    vprotect hvm -g 4c999c85-e223-4df3-9c40-7b0115234c8c
    Copied!
  • To index VMs and hypervisors on the given HV manager:
    1
    vprotect hvm -s 4c999c85-e223-4df3-9c40-7b0115234c8c
    Copied!
  • To create a HV manager you need to execute the following commands:
    • Create HV manger entry with given type:
      1
      vprotect hvm -c https://dovirt-m.lab.local/ovirt-engine/api/v3 rhev
      Copied!
    • Use GUID returned to set credentials:
      1
      vprotect hvm -u 4c999c85-e223-4df3-9c40-7b0115234c8c [email protected] password
      Copied!
    • By default current node configuration is used for created HV manager - you may change it with this command (first HV GUID, then node configuration GUID):
      1
      vprotect hvm -n 4c999c85-e223-4df3-9c40-7b0115234c8c e2673e8f-66fc-4e9f-aaef-20958c4c2b01
      Copied!
      Hypervisors connected to the HV manager will have node configuration of the HV manager assigned by default. For backup export always node configuration assigned to the HV is used.

Hypervisors

Hypervisor management module is used to add, remove hypervisors and invoke indexing task. Indexing tasks gathers information about VMs running on the hypervisor and updates their location if the VM has been moved within the pool.
To manage hypervisors in the system use vprotect hv sub-command.
Note that if you're using RHV/oVirt/Oracle VM then hypervisors will be detected automatically as a part of index task. So there is no need to define OVM hypervisors and for RHV/oVirt KVM hosts will be detected automatically.
1
[[email protected] ~]# vprotect hv
2
Incorrect syntax: Missing required option: [-sC Modify hypervisor configuration, -c Create hypervisor (type = ["citrix", "nutanix", "proxmox", "ovm", "kvm", "xen"]), -s Synchronize inventory with hypervisor, -d Delete hypervisor, -nC Set node config for hypervisor, -e Set export/import mode for hypervisor, -u Set user/password, -g Show hypervisor details, -sK Set SSH key path, -l List hypervisors, -L List VMs for hypervisor, -m Modify hypervisor]
3
4
usage: hv -c <HOST> <TYPE> | -d <GUID | HOST> | -e <GUID | HOST> <DEFAULT|VM_IMAGE_PLUS_INCREMENTAL_DISKS|CHANGED_BLOCK_TRACKING|SSH_TRANSFER|EXPORT_STORAGE_REPO> | -g <GUID | HOST> | -l | -L <GUID | HOST> | -m <GUID | HOST> <NEW_HOST> | -nC <GUID | HOST> <NODE_CONFIG_GUID> | -s
5
<GUID | HOST> | -sC <GUID> <PROPERTY_NO.> <VALUE> | -sK <GUID> <SSH_KEYPATH> | -u <GUID | HOST> <USER> <PASSWORD>
6
7
Hypervisor management
8
-c,--create <HOST> <TYPE> Create hypervisor (type = ["citrix", "nutanix", "proxmox", "ovm", "kvm", "xen"])
9
-d,--delete <GUID | HOST> Delete hypervisor
10
-e,--set-export-import-mode <GUID | HOST> <DEFAULT|VM_IMAGE_PLUS_INCREMENTAL_DISKS|CHANGED_BLOCK_TRACKING|SSH_TRANSFER|EXPORT_STORAGE_REPO> Set export/import mode for hypervisor
11
-g,--details <GUID | HOST> Show hypervisor details
12
-l,--list List hypervisors
13
-L,--list-vms <GUID | HOST> List VMs for hypervisor
14
-m,--modify <GUID | HOST> <NEW_HOST> Modify hypervisor
15
-nC,--set-node-config <GUID | HOST> <NODE_CONFIG_GUID> Set node config for hypervisor
16
-s,--sync <GUID | HOST> Synchronize inventory with hypervisor
17
-sC,--configuration <GUID> <PROPERTY_NO.> <VALUE> Modify hypervisor configuration
18
-sK,--set-ssh-key-path <GUID> <SSH_KEYPATH> Set SSH key path
19
-u,--credentials <GUID | HOST> <USER> <PASSWORD> Set user/password
Copied!

Examples

  • To list all hypervisors
    1
    vprotect hv -l
    Copied!
  • To show details of the given hypervisor (by GUID)
    1
    vprotect hv -g c93140b8-a898-4aff-8eef-645587ca8289
    Copied!
  • To index VMs on the given HV:
    1
    vprotect hv -s c93140b8-a898-4aff-8eef-645587ca8289
    Copied!
  • To create a hypervisor you need to execute the following commands:
    • Create HV entry with given type:
      1
      vprotect hv -c 1.2.3.4 citrix
      Copied!
    • Use GUID returned to set credentials:
      1
      vprotect hv -u a757c6e8-ece0-467b-b912-dfe393d1e421 root password
      Copied!
    • By default current node configuration is used for created hypervisor - you may change it with this command (first HV GUID, then node configuration GUID):
      1
      vprotect hv -n a757c6e8-ece0-467b-b912-dfe393d1e421 e2673e8f-66fc-4e9f-aaef-20958c4c2b01
      Copied!

Hypervisor clusters

Hypervisor clusters management module enables you to view and remove clsters detected on RHV/oVirt/Nutanix/OVM/XenServer enviornments.
To view or delete them use vprotect hc sub-command.
1
[[email protected] ~]# vprotect hc
2
Incorrect syntax: Missing required option: [-d Delete HV cluster, -l List HV clusters]
3
4
usage: hc -d <GUID> | -l
5
Hypervisor cluster management
6
-d,--delete <GUID> Delete HV cluster
7
-l,--list List HV clusters
Copied!

Examples

  • To list all detected clusters:
    1
    vprotect hc -l
    Copied!
  • To delete a cluster with GUID 107bc87a-9adf-4d6c-b732-345dd06c59e9:
    1
    vprotect hc -d 107bc87a-9adf-4d6c-b732-345dd06c59e9
    Copied!

Hypervisor storage

Hypervisor storage management module enables you to view and remove storage detected on RHV/oVirt/Nutanix/OVM/XenServer enviornments. You can select storage in restore dialog box for XenServer/Nutanix and RHV/oVirt (v4) platforms.
To view or delete them use vprotect hs sub-command.
1
[[email protected] ~]# vprotect hs
2
Incorrect syntax: Missing required option: [-d Delete HV storage, -l List HV storage]
3
4
usage: hs -d <GUID> | -l
5
Hypervisor storage management
6
-d,--delete <GUID> Delete HV storage
7
-l,--list List HV storage
Copied!

Examples

  • To list all detected storage volumes:
    1
    vprotect hs -l
    Copied!
  • To delete a storage volume with GUID 6b5aa45a-5436-47cd-82ce-1c4250742323:
    1
    vprotect hs -d 6b5aa45a-5436-47cd-82ce-1c4250742323
    Copied!

Virtual machines

Virtual machine management module is used to provide information about VMs that has been detected on hypervisors, report status of last backup of your VMs (and all backups for a particular VM) and set priority for operations invoked on VM.
To manage VMs in the system use vprotect vm sub-command.
VMs are detected automatically during Index task executed on the HV or HV manager.
1
[[email protected] ~]# vprotect vm
2
Incorrect syntax: Missing required option: [-A Assign VM to the policy, -D List detected VM disks, -xC Set pre-snapshot CMD as semi-colon-separated string, i.e. "cmd;-a;-b", -wb Acknowledge warnings related to the backup, -L List backups of the VM, -xE Set pre-snapshot CMD exec enabled (1) / disabled (0), -rvS Revert snapshot, -cS Create VM snapshot, -se Set handling for pre-snap standard error. Values: DONT_IGNORE, IGNORE_WITH_WARNING, IGNORE_WITHOUT_WARNING, -S List managed VM snapshots, -T List tasks related to the VM, -si Set pre-snap ignored command exit codes e.g. '15, 101-150' or '*', -gb Show backup details, -d Delete VM, -g Show virtual machine details, -XC Set post-snapshot CMD as semi-colon-separated string, i.e. "cmd;-a;-b", -l List VMs, -XE Set post-snapshot CMD exec enabled (1) / disabled (0), -sC Set SSH access credentials, -sE Set handling for post-snap standard error. Values: DONT_IGNORE, IGNORE_WITH_WARNING, IGNORE_WITHOUT_WARNING, -sH Set SSH access host/port, -sI Set post-snap ignored command exit codes e.g. '15, 101-150' or '*', -w Acknowledge all backup warnings related to the VM, -sK Set SSH key path, -rmS Remove old snapshots, -eD Exclude disk from backup excluded (1) / included (0)]
3
4
usage: vm -A <GUID> <VM_POLICY_GUID> | -cS <GUID> <RULE_GUID> <PRIORITY> | -D <GUID> | -d <GUID> | -eD <DISK_GUID> <0|1> | -g <<VM_GUID>> | -gb <BACKUP_GUID> | -L <GUID> | -l | -rmS <VM_GUID,...,VM_GUID> | -rvS <SNAPSHOT_GUID> | -S <GUID> | -sC <GUID> <SSH_USER> <SSH_PASS> | -se
5
<GUID> <HANDLING> | -sE <GUID> <HANDLING> | -sH <GUID> <SSH_HOST> <SSH_PORT> | -si <GUID> <IGNORED_EXIT_CODES> | -sI <GUID> <IGNORED_EXIT_CODES> | -sK <GUID> <SSH_KEYPATH> | -T <GUID> | -w <GUID> | -wb <BACKUP_GUID> | -xC <GUID> <CMD_STRING> | -XC <GUID> <CMD_STRING> | -xE
6
<GUID> <0|1> | -XE <GUID> <0|1>
7
8
Virtual machine management
9
-A,--assign-vm-policy <GUID> <VM_POLICY_GUID> Assign VM to the policy
10
-cS,--create-snapshot <GUID> <RULE_GUID> <PRIORITY> Create VM snapshot
11
-D,--list-disks <GUID> List detected VM disks
12
-d,--delete <GUID> Delete VM
13
-eD,--exclude-disk <DISK_GUID> <0|1> Exclude disk from backup excluded (1) / included (0)
14
-g,--details <<VM_GUID>> Show virtual machine details
15
-gb,--show-backup-details <BACKUP_GUID> Show backup details
16
-L,--list-backups <GUID> List backups of the VM
17
-l,--list List VMs
18
-rmS,--remove-snapshot <VM_GUID,...,VM_GUID> Remove old snapshots
19
-rvS,--revert-snapshot <SNAPSHOT_GUID> Revert snapshot
20
-S,--list-snapshots <GUID> List managed VM snapshots
21
-sC,--set-ssh-credentials <GUID> <SSH_USER> <SSH_PASS> Set SSH access credentials
22
-se,--set-pre-std-error-out <GUID> <HANDLING> Set handling for pre-snap standard error. Values: DONT_IGNORE, IGNORE_WITH_WARNING, IGNORE_WITHOUT_WARNING
23
-sE,--set-post-std-error-out <GUID> <HANDLING> Set handling for post-snap standard error. Values: DONT_IGNORE, IGNORE_WITH_WARNING, IGNORE_WITHOUT_WARNING
24
-sH,--set-ssh-host <GUID> <SSH_HOST> <SSH_PORT> Set SSH access host/port
25
-si,--set-pre-ignored-codes <GUID> <IGNORED_EXIT_CODES> Set pre-snap ignored command exit codes e.g. '15, 101-150' or '*'
26
-sI,--set-post-ignored-codes <GUID> <IGNORED_EXIT_CODES> Set post-snap ignored command exit codes e.g. '15, 101-150' or '*'
27
-sK,--set-ssh-key-path <GUID> <SSH_KEYPATH> Set SSH key path
28
-T,--list-tasks <GUID> List tasks related to the VM
29
-w,--ack-all-backup-warnings <GUID> Acknowledge all backup warnings related to the VM
30
-wb,--ack-backup-warnings <BACKUP_GUID> Acknowledge warnings related to the backup
31
-xC,--set-pre-snap-cmd <GUID> <CMD_STRING> Set pre-snapshot CMD as semi-colon-separated string, i.e. "cmd;-a;-b"
32
-XC,--set-post-snap-cmd <GUID> <CMD_STRING> Set post-snapshot CMD as semi-colon-separated string, i.e. "cmd;-a;-b"
33
-xE,--set-pre-snap-cmd-exec-enabled <GUID> <0|1> Set pre-snapshot CMD exec enabled (1) / disabled (0)
34
-XE,--set-post-snap-cmd-exec-enabled <GUID> <0|1> Set post-snapshot CMD exec enabled (1) / disabled (0
Copied!

Examples

  • To list all VMs
    1
    vprotect vm -l
    Copied!
  • To show details of the given VM (by GUID)
    1
    vprotect vm -g 0f36f40c-6427-4035-9f2b-1ead6aca3597
    Copied!
  • To add VM (first GUID) to the given policy (second GUID):
    1
    vprotect vm -A 0f36f40c-6427-4035-9f2b-1ead6aca3597 3afcd507-a4f5-484d-8d34-53c73d7a5809
    Copied!
  • To show backup history of a VM with given GUID:
    1
    vprotect vm -L 0f36f40c-6427-4035-9f2b-1ead6aca3597
    Copied!
  • To create snapshot of a VM with given GUID (VM must have snapshot policy already assigned):
    1
    vprotect vm -cS 0f36f40c-6427-4035-9f2b-1ead6aca3597
    Copied!

Storage backup management

This module is responsible for managing storage instances and actions related to backups/schedules/policies etc.
1
[[email protected] ~]# vprotect st
2
Incorrect syntax: Missing required option:
3
[-A Assign Storage to the policy, -a Assign Storage to the snapshot policy,
4
-d Delete Storage, -g Show Storage details, -wb Acknowledge warnings related
5
to the backup, -xC Set pre-snapshot CMD as semi-colon-separated string,
6
i.e. "cmd;-a;-b", -XC Set post-snapshot CMD as semi-colon-separated string,
7
i.e. "cmd;-a;-b", -l List Storages, -L List backups of the Storage,
8
-sC Set SSH access credentials, -se Set handling for pre-snap standard error.
9
Values: DONT_IGNORE, IGNORE_WITH_WARNING, IGNORE_WITHOUT_WARNING,
10
-sE Set handling for post-snap standard error. Values: DONT_IGNORE,
11
IGNORE_WITH_WARNING, IGNORE_WITHOUT_WARNING, -s Modify Storage configuration,
12
-T List tasks related to the Storage, -w Acknowledge all backup warnings
13
related to the Storage, -gb Show backup details]
14
15
usage: st -A <GUID> <STORAGE_POLICY_GUID> | -a <GUID> <SNAPSHOT_POLICY_GUID> |
16
-d <GUID> | -g <GUID> | -gb <BACKUP_GUID> | -l | -L <GUID> |
17
-s <GUID> <PROPERTY_NO.> <VALUE> | -sC <GUID> <SSH_USER> <SSH_PASS> |
18
-se <GUID> <HANDLING> | -sE <GUID> <HANDLING> |-T <GUID> | -w <GUID> |
19
-wb <BACKUP_GUID> | -xC <GUID> <CMD_STRING> | -XC <GUID> <CMD_STRING>
20
Storage management
21
-A,--assign-storage-policy <GUID> <STORAGE_POLICY_GUID>
22
#Assign Storage to the policy
23
-a,--assign-snapshot-policy <GUID> <SNAPSHOT_POLICY_GUID>
24
#Assign Storage to the snapshot policy
25
-d,--delete <GUID>
26
#Delete Storage
27
-g,--details <GUID>
28
#Show Storage details
29
-gb,--show-backup-details <BACKUP_GUID>
30
#Show backup details
31
-l,--list
32
#List Storages
33
-L,--list-backups <GUID>
34
#List backups of the Storage
35
-s,--configuration <GUID> <PROPERTY_NO.> <VALUE>
36
#Modify Storage configuration
37
-sC,--set-ssh-credentials <GUID> <SSH_USER> <SSH_PASS>
38
#Set SSH access credentials
39
-se,--set-pre-std-error-out <GUID> <HANDLING>
40
#Set handling for pre-snap standard error. Values: DONT_IGNORE,
41
#IGNORE_WITH_WARNING, IGNORE_WITHOUT_WARNING
42
-sE,--set-post-std-error-out <GUID> <HANDLING>
43
#Set handling for post-snap standard error. Values: DONT_IGNORE,
44
#IGNORE_WITH_WARNING, IGNORE_WITHOUT_WARNING
45
-T,--list-tasks <GUID>
46
#List tasks related to the Storage
47
-w,--ack-all-backup-warnings <GUID>
48
#Acknowledge all backup warnings related to the Storage
49
-wb,--ack-backup-warnings <BACKUP_GUID>
50
#Acknowledge warnings related to the backup
51
-xC,--set-pre-snap-cmd <GUID> <CMD_STRING>
52
#Set pre-snapshot CMD as semi-colon-separated string, i.e. "cmd;-a;-b"
53
-XC,--set-post-snap-cmd <GUID> <CMD_STRING>
54
#Set post-snapshot CMD as semi-colon-separated string, i.e. "cmd;-a;-b"
Copied!

Examples

Storage pool management

This small module allows us to list and deleting inventoried storage pools.
1
[[email protected] ~]# vprotect stpool
2
Incorrect syntax: Missing required option: [-d Delete Storage Pool,
3
-l List Storage Pools]
4
5
usage: stpool -d <GUID> | -l
6
Storage pool management
7
-d,--delete <GUID> Delete Storage Pool
8
-l,--list List Storage Pools
Copied!

Examples

To list storage pools
1
[[email protected] ~]# vprotect stpool -l
2
3
GUID Name UUID Storage Provider
4
------------------------------------ ------- -------------------------------------- ----------------
5
b1171aba-aeb3-4e10-84dd-f3e3c0dc3235 backups 537e00c8-620d-4256-8d6c-e5e031327caa_1 last-ceph
6
86f41229-6f13-41b3-b1ce-c5841df7b4c7 images 537e00c8-620d-4256-8d6c-e5e031327caa_4 last-ceph
7
55832390-1779-483b-8023-88bb9a79b6ed vms 537e00c8-620d-4256-8d6c-e5e031327caa_3 last-ceph
8
ff3a9f65-0b5f-4a78-8b97-b883cb971f81 volumes 537e00c8-620d-4256-8d6c-e5e031327caa_2 last-ceph
Copied!

Storage providers management

This module is responsible for managing the storage provider's infrastructure. So performing tasks such as adding/removing / inventorying, etc.
1
[[email protected] ~]# vprotect stprovider
2
Incorrect syntax: Missing required option: [-sC Modify Storage Provider configuration, -c Create Storage Provider, -s Synchronize inventory with Storage Provider, -d Delete Storage Provider, -u Set user/password, -nC Set node config for Storage Provider, -g Show Storage Providers details, -h Set host for Storage Provider, -l List Storage Providers, -L List Storages for Storage Provider, -n Set node for Storage Provider]
3
4
usage: stprovider -c <HOST> <TYPE> | -d <GUID> | -g <GUID> | -h <GUID> <HOST> | -l | -L <GUID> | -n <GUID> <NODE_GUID> | -nC <GUID> <NODE_CONFIG_GUID> | -s <GUID> | -sC <GUID> <PROPERTY_NO.> <VALUE> | -u <GUID> <USER> <PASSWORD>
5
+Storage provider management
6
-c,--create <HOST> <TYPE> Create Storage Provider
7
-d,--delete <GUID> Delete Storage Provider
8
-g,--details <GUID> Show Storage Providers details
9
-h,--set-host <GUID> <HOST> Set host for Storage Provider
10
-l,--list List Storage Providers
11
-L,--list-storages <GUID> List Storages for Storage Provider
12
-n,--set-node <GUID> <NODE_GUID> Set node for Storage Provider
13
-nC,--set-node-config <GUID> <NODE_CONFIG_GUID> Set node config for Storage Provider
14
-s,--sync <GUID> Synchronize inventory with Storage Provider
15
-sC,--configuration <GUID> <PROPERTY_NO.> <VALUE> Modify Storage Provider configuration
16
-u,--credentials <GUID> <USER> <PASSWORD> Set user/password
Copied!

Examples

VM backup policies

Virtual machine backup policies management module is used to define backup policies of VMs. You can assign different backup priority for a policy when the scheduler invokes backup task. You need first to define a VM policy and then add VMs to it. VM can belong only to a single backup policy.
To manage VM policies in the system use vprotect vmpolicy sub-command.
VMs are assigned automatically to the policy only if VM has no policy assigned already. If automatic assignment has been turned on for a policy and either name of the VM matches regular expression, or tag detected (Citrix/oVirt/RHV/Oracle VM) matches tag defined for the policy, VM is assigned to the policy, and all schedules for a policy will also be automatically invoked for this VM.
Note: it is important to assign backup destination for a policy (required for node to know where to store backups)
1
[[email protected] ~]# vprotect vmpolicy
2
Required option: [-rR Remove auto-assignment RE, -rT Remove auto-assignment tag, -aC Set auto-assignment HV clusters, -b Set backup destination for the VM policy, -c Create a new policy, -d Delete a policy, -g Show details, -l List policies, -L List VMs in the policy, -aM Set auto-assignment mode, -m Modify policy, -aN Set auto-removal of non-present VMs flag, -p Set policy's backup task priority (0-100, 50 = default), -aR Add auto-assignment RE, -aT Add auto-assignment tag, -S List schedules for the policy, -s Set schedules for the VM policy, -U Unassign VMs from the policy, -V Assign VMs to the policy]
3
4
usage: vmpolicy -aC <GUID > <[HV_CLUSTER_GUID,...,HV_CLUSTER_GUID]> | -aM <GUID> <DISABLED|ASSIGN_ONLY|ASSIGN_AND_REMOVE> | -aN <GUID> <0|1> | -aR <GUID>
5
<inc|exc> <REG_EXP> | -aT <GUID> <inc|exc> <TAG> | -b <GUID> <BD_GUID | BD_NAME>> | -c <NAME> | -d <GUID> | -g <GUID> | -l | -L <GUID> | -m <GUID>
6
<NAME> | -p <GUID> <PRIORITY> | -rR <GUID> <inc|exc> <REG_EXP> | -rT <GUID> <inc|exc> <TAG> | -S <GUID> | -s <GUID> <SCHED_GUID,...,SCHED_GUID> | -U
7
<VM_GUID,...,VM_GUID> | -V <GUID> <VM_GUID,...,VM_GUID>
8
VM backup policy management
9
-aC,--set-auto-assign-hv-clusters <GUID > <[HV_CLUSTER_GUID,...,HV_CLUSTER_GUID]> Set auto-assignment HV clusters
10
-aM,--set-auto-assign-mode <GUID> <DISABLED|ASSIGN_ONLY|ASSIGN_AND_REMOVE> Set auto-assignment mode
11
-aN,--set-auto-remove-non-present <GUID> <0|1> Set auto-removal of non-present VMs flag
12
-aR,--add-auto-assign-re <GUID> <inc|exc> <REG_EXP> Add auto-assignment RE
13
-aT,--add-auto-assign-tag <GUID> <inc|exc> <TAG> Add auto-assignment tag
14
-b,--set-backup-destination <GUID> <BD_GUID | BD_NAME>> Set backup destination for the VM policy
15
-c,--create <NAME> Create a new policy
16
-d,--delete <GUID> Delete a policy
17
-g,--details <GUID> Show details
18
-l,--list List policies
19
-L,--list-vms <GUID> List VMs in the policy
20
-m,--modify <GUID> <NAME> Modify policy
21
-p,--set-priority <GUID> <PRIORITY> Set policy's backup task priority (0-100, 50 = default)
22
-rR,--remove-auto-assign-re <GUID> <inc|exc> <REG_EXP> Remove auto-assignment RE
23
-rT,--remove-auto-assign-tag <GUID> <inc|exc> <TAG> Remove auto-assignment tag
24
-S,--list-schedules <GUID> List schedules for the policy
25
-s,--set-schedules <GUID> <SCHED_GUID,...,SCHED_GUID> Set schedules for the VM policy
26
-U,--unassign-vms <VM_GUID,...,VM_GUID> Unassign VMs from the policy
27
-V,--assign-vms <GUID> <VM_GUID,...,VM_GUID> Assign VMs to the policy
Copied!

Examples

  • To list all VM policies
    1
    vprotect vmpolicy -l
    Copied!
  • To show details of the given VM (by GUID)
    1
    vprotect vmpolicy -g 3afcd507-a4f5-484d-8d34-53c73d7a5809
    Copied!
  • To create a new policy
    1
    vprotect vmpolicy -c "My Policy"
    Copied!
  • To add policy1 tag (include) for a policy:
    1
    vprotect vmpolicy -aT 3afcd507-a4f5-484d-8d34-53c73d7a5809 inc policy1
    Copied!
  • To remove policy1 tag (include) for a policy:
    1
    vprotect vmpolicy -rT 3afcd507-a4f5-484d-8d34-53c73d7a5809 inc policy1
    Copied!
  • To set 2 schedules (GUIDs are comma-separated) for a policy (first GUID):
    1
    vprotect vmpolicy -s 3afcd507-a4f5-484d-8d34-53c73d7a5809 391203e3-ad6c-4532-b69c-78b3a5cf4ef5,e4c1c61d-26db-4e41-87cf-2195d5498cde
    Copied!
  • To set backup destination (you can use name or GUID) for a policy (first GUID):
    1
    vprotect vmpolicy -b 3afcd507-a4f5-484d-8d34-53c73d7a5809 ISP
    Copied!

Snapshot management policies for VMs

Snapshot management policies module enables CDM for your VMs and manages their retention. Currently it is supported for KVM, Citrix, RHV/oVirt/OLVM platforms.
To manage snapshot policies for VMs in the system use vprotect vm-snappolicy sub-command.
VMs are assigned automatically to the policy only if VM has no policy assigned already. If automatic assignment has been turned on for a policy and either name of the VM matches regular expression, or tag detected (Citrix/RHV/oVirt/OLVM) matches tag defined for the policy, VM is assigned to the policy, and all schedules for a policy will also be automatically invoked for this VM.
Note: only VMs with assigned snapshot management policy can be snapshot from the CLI or UI
1
[[email protected] ~]# vprotect vm-snappolicy
2
Required option: [-rR Remove rules from policy, -rT Remove auto-assignment tag, -aC Set auto-assignment HV clusters, -c Create a new policy, -d Delete a policy, -g Show details, -l List policies, -L List VMs in the policy, -aM Set auto-assignment mode, -m Modify policy, -aN Set auto-removal of non-present VMs flag, -p Set policy's backup task priority (0-100, 50 = default), -aR Add new rule to selected policy, -r List rules for policy, -aT Add auto-assignment tag, -U Unassign VMs from the policy, -V Assign VMs to the policy]
3
4
usage: vm-snappolicy -aC <GUID > <[HV_CLUSTER_GUID,...,HV_CLUSTER_GUID]> | -aM <GUID> <DISABLED|ASSIGN_ONLY|ASSIGN_AND_REMOVE> | -aN <GUID> <0|1> | -aR <NAME>
5
<POLICY_GUID> <RETENTION_DAYS> <RETENTION_VERSIONS> | -aT <GUID> <inc|exc> <TAG> | -c <NAME> | -d <GUID> | -g <GUID> | -l | -L <GUID> | -m <GUID>
6
<NAME> | -p <GUID> <PRIORITY> | -r <GUID> | -rR <POLICY_GUID> <RULE_GUID,...,RULE_GUID> | -rT <GUID> <inc|exc> <TAG> | -U <VM_GUID,...,VM_GUID> | -V
7
<GUID> <VM_GUID,...,VM_GUID>
8
Snapshot policy management
9
-aC,--set-auto-assign-hv-clusters <GUID > <[HV_CLUSTER_GUID,...,HV_CLUSTER_GUID]> Set auto-assignment HV clusters
10
-aM,--set-auto-assign-mode <GUID> <DISABLED|ASSIGN_ONLY|ASSIGN_AND_REMOVE> Set auto-assignment mode
11
-aN,--set-auto-remove-non-present <GUID> <0|1> Set auto-removal of non-present VMs flag
12
-aR,--add-rule <NAME> <POLICY_GUID> <RETENTION_DAYS> <RETENTION_VERSIONS> Add new rule to selected policy
13
-aT,--add-auto-assign-tag <GUID> <inc|exc> <TAG> Add auto-assignment tag
14
-c,--create <NAME> Create a new policy
15
-d,--delete <GUID> Delete a policy
16
-g,--details <GUID> Show details
17
-l,--list List policies
18
-L,--list-vms <GUID> List VMs in the policy
19
-m,--modify <GUID> <NAME> Modify policy
20
-p,--set-priority <GUID> <PRIORITY> Set policy's backup task priority (0-100, 50 = default)
21
-r,--list-rules <GUID> List rules for policy
22
-rR,--remove-rules <POLICY_GUID> <RULE_GUID,...,RULE_GUID> Remove rules from policy
23
-rT,--remove-auto-assign-tag <GUID> <inc|exc> <TAG> Remove auto-assignment tag
24
-U,--unassign-vms <VM_GUID,...,VM_GUID> Unassign VMs from the policy
25
-V,--assign-vms <GUID> <VM_GUID,...,VM_GUID> Assign VMs to the policy
Copied!

Examples

  • To list all snapshot policies
    1
    vprotect vm-snappolicy -l
    Copied!
  • To show details of the given VM (by GUID)
    1
    vprotect vm-snappolicy -g 3afcd507-a4f5-484d-8d34-53c73d7a5809
    Copied!
  • To create a new policy
    1
    vprotect vm-snappolicy -c "My Policy"
    Copied!
  • To add policy1 tag (include) for a policy:
    1
    vprotect vm-snappolicy -aT 3afcd507-a4f5-484d-8d34-53c73d7a5809 inc policy1
    Copied!
  • To remove policy1 tag (include) for a policy:
    1
    vprotect vm-snappolicy -rT 3afcd507-a4f5-484d-8d34-53c73d7a5809 inc policy1
    Copied!
  • To set 2 schedules (GUIDs are comma-separated) for a policy (first GUID):
    1
    vprotect vm-snappolicy -s 3afcd507-a4f5-484d-8d34-53c73d7a5809 391203e3-ad6c-4532-b69c-78b3a5c
    Copied!

Snapshot management policies for storages

To manage snapshot policies for storages in the system use vprotect storage-snappolicy sub-command.
Storages are assigned automatically to the policy only if storage has no policy assigned already. If automatic assignment has been turned on for a policy and name of the storage matches regular expression, storage is assigned to the policy, and all schedules for a policy will also be automatically invoked for this storage.
Note: only storages with assigned snapshot management policy can be snapshot from the CLI or UI
1
[[email protected] ~]# vprotect storage-snappolicy
2
Incorrect syntax: Missing required option: [-rR Remove rules from policy, -c Create a new policy, -d Delete a policy, -g Show details, -l List policies, -aM Set auto-assignment mode, -L List storages in the policy, -m Modify policy, -aN Set auto-removal of non-present VMs flag, -aP Set auto-assignment storage pools, -p Set policy's backup task priority (0-100, 50 = default), -aR Add new rule to selected policy, -r List rules for policy, -S Assign storages to the policy, -U Unassign storages from the policy]
3
4
usage: storage-snappolicy -aM <GUID> <DISABLED|ASSIGN_ONLY|ASSIGN_AND_REMOVE> | -aN <GUID> <0|1> | -aP <GUID > <[STORAGE_POOL_GUID,...,STORAGE_POOL_GUID]> | -aR <NAME> <POLICY_GUID> <RETENTION_DAYS> <RETENTION_VERSIONS> | -c <NAME> | -d <GUID> | -g <GUID> | -l | -L <GUID> | -m
5
<GUID> <NAME> | -p <GUID> <PRIORITY> | -r <GUID> | -rR <POLICY_GUID> <RULE_GUID,...,RULE_GUID> | -S <GUID> <STORAGE_GUID,...,STORAGE_GUID> | -U <STORAGE_GUID,...,STORAGE_GUID>
6
+Snapshot policy management for storages
7
-aM,--set-auto-assign-mode <GUID> <DISABLED|ASSIGN_ONLY|ASSIGN_AND_REMOVE> Set auto-assignment mode
8
-aN,--set-auto-remove-non-present <GUID> <0|1> Set auto-removal of non-present VMs flag
9
-aP,--set-auto-assign-storage-pools <GUID > <[STORAGE_POOL_GUID,...,STORAGE_POOL_GUID]> Set auto-assignment storage pools
10
-aR,--add-rule <NAME> <POLICY_GUID> <RETENTION_DAYS> <RETENTION_VERSIONS> Add new rule to selected policy
11
-c,--create <NAME> Create a new policy
12
-d,--delete <GUID> Delete a policy
13
-g,--details <GUID> Show details
14
-l,--list List policies
15
-L,--list-storages <GUID> List storages in the policy
16
-m,--modify <GUID> <NAME> Modify policy
17
-p,--set-priority <GUID> <PRIORITY> Set policy's backup task priority (0-100, 50 = default)
18
-r,--list-rules <GUID> List rules for policy
19
-rR,--remove-rules <POLICY_GUID> <RULE_GUID,...,RULE_GUID> Remove rules from policy
20
-S,--assign-storages <GUID> <STORAGE_GUID,...,STORAGE_GUID> Assign storages to the policy
21
-U,--unassign-storages <STORAGE_GUID,...,STORAGE_GUID> Unassign storages from the policy
Copied!

Examples

To list all snapshot policies
1
vprotect storage-snappolicy -l
Copied!
  • To show details of the given snapshot policy (by GUID)
    1
    vprotect storage-snappolicy -g 3afcd507-a4f5-484d-8d34-53c73d7a5809
    Copied!
  • To create a new policy
    1
    vprotect storage-snappolicy -c "My Policy"
    Copied!
  • To set 2 schedules (GUIDs are comma-separated) for a policy (first GUID):
    1
    vprotect vm-snappolicy -s 3afcd507-a4f5-484d-8d34-53c73d7a5809 \
    2
    391203e3-ad6c-4532-b69c-78b3a5c
    Copied!

Schedules

Schedule management module is used to create schedules associated with VMs or groups of VMs. Each schedule defines days of week and the hour when the backup tasks should be invoked. Each schedule also defines time window in which the backup process must start. If the task queue is full and the tasks starts after the specified amount of time from the schedule – it will be cancelled and marked as failed.
Note:
  • tasks in the queue are run in the order from the highest to the lowest priority.
  • you can assign multiple schedules if you need backup to be executed at different hours on different days
  • remember always to assign schedule to VM or VM group – schedule can be assigned only to a single VM or VM group
To manage schedules in the system use vprotect sched sub-command.
1
[[email protected] ~]# vprotect sched
2
Incorrect syntax: Missing required option: [-a Set schedule to be active (1) / not active (0), -c <NAME> <VM_BACKUP | SNAPSHOT | APP_BACKUP> <BACKUP_TYPE> <TIME | INTERVAL> <START_TIME | INTERVAL_START_HOUR-INTERVAL_END_HOUR> <DURATION | INTERVAL_FREQUENCY> <everyday | LIST_OF_DAYS_OF_WEEK> <any | FIRST_IN_MONTH | SECOND_IN_MONTH | THIRD_IN_MONTH | FOURTH_IN_MONTH | LAST_IN_MONTH> <any | LIST_OF_MONTHS
3
Create schedule for VM (backup type: FULL / INCREMENTAL), -d Delete schedule, -g Show details, -l List schedules, -m <GUID> <NAME> <TYPE> <TIME | INTERVAL> <START_TIME | INTERVAL_START_HOUR-INTERVAL_END_HOUR> <DURATION | INTERVAL_FREQUENCY> <everyday | LIST_OF_DAYS_OF_WEEK> <any | FIRST_IN_MONTH | SECOND_IN_MONTH | THIRD_IN_MONTH | FOURTH_IN_MONTH | LAST_IN_MONTH> <any | LIST_OF_MONTHS
4
Modify schedule (backup type: FULL / INCREMENTAL)]
5
6
usage: sched -a <arg> | -c <arg> | -d <arg> | -g <arg> | -l | -m <arg>
7
8
Schedule management
9
-a,--set-active <GUID> <0|1> Set schedule to be active (1) / not active (0)
10
-c,--create <NAME> <VM_BACKUP | SNAPSHOT | APP_BACKUP> <BACKUP_TYPE> <TIME | INTERVAL> <START_TIME | INTERVAL_START_HOUR-INTERVAL_END_HOUR> <DURATION |
11
INTERVAL_FREQUENCY> <everyday | LIST_OF_DAYS_OF_WEEK> <any | FIRST_IN_MONTH | SECOND_IN_MONTH | THIRD_IN_MONTH | FOURTH_IN_MONTH | LAST_IN_MONTH> <any | LIST_OF_MONTHS>
12
Create schedule for VM (backup type: FULL / INCREMENTAL)
13
-d,--delete <GUID> Delete schedule
14
-g,--show-details <GUID> Show details
15
-l,--list List schedules
16
-m,--modify <GUID> <NAME> <TYPE> <TIME | INTERVAL> <START_TIME | INTERVAL_START_HOUR-INTERVAL_END_HOUR> <DURATION | INTERVAL_FREQUENCY> <everyday |
17
LIST_OF_DAYS_OF_WEEK> <any | FIRST_IN_MONTH | SECOND_IN_MONTH | THIRD_IN_MONTH | FOURTH_IN_MONTH | LAST_IN_MONTH> <any | LIST_OF_MONTHS>
18
Modify schedule (backup type: FULL / INCREMENTAL)
Copied!

Examples

  • To list all schedules
    1
    vprotect sched -l
    Copied!
  • To create a full backup schedule with name Schedule1 executed every day at 05:00 with 60 minutes of time window:
    1
    vprotect sched -c Schedule1 FULL 05:00 60 everyday
    Copied!
  • To create a incremental backup schedule with name Schedule2 executed every Monday, Wednesday and Friday at 17:00 with 90 minutes of time window:
    1
    vprotect sched -c Schedule2 INCREMENTAL 17:00 90 mon,wed,fri
    Copied!
    Note that days of week are given as a single comma-separated string of short (3-letter) weekday names
  • To create schedules (full backup) with name Schedule3 and Schedule4 executed every Tuesday at 02:00 and every Wednesday at 03:00 with 90 minutes of time window and assign them to the VM group with ID 123:
    1
    vprotect sched -c Schedule3 FULL 02:00 90 tue
    2
    vprotect sched -c Schedule4 FULL 03:00 90 wed
    3
    vprotect vmg -s 3afcd507-a4f5-484d-8d34-53c73d7a5809 8d8649cf-d3a1-4e54-b58b-69e51b2456e2,e694dba7-0fdf-44dc-beec-3c9e480b0621
    Copied!
    assuming GUIDs generated for new schedules 8d8649cf-d3a1-4e54-b58b-69e51b2456e2 and e694dba7-0fdf-44dc-beec-3c9e480b0621 respectively:
  • To disable a schedule with GUID 6651787d-9a55-421d-8158-ead80a70a9cb:
    1
    vprotect sched -a 6651787d-9a55-421d-8158-ead80a70a9cb 0
    Copied!

VM backup/restore

This module is used to manage backup and restore process. It is also used to list backups of a particular VM.
To invoke backup and restore tasks use vprotect brvm sub-command.
1
[[email protected] ~]# vprotect brvm
2
Required option: [-b Backup (full), -B Backup (full) with task priority (0-100, 50 = default), -gL Show file details, -F List file systems, -H Restore the backup to the hypervisor. For KVM mixed volumes please provide storages in form of BF_GUID=STORAGE_ID with files separated by semicolon, i.e. "BF_GUID=STORAGE_ID; BF_GUID2=STORAGE_ID2 ...", -i Backup VM (incremental), -I Backup VM (incremental) with task priority (0-100, 50 = default), -l List backups, -L List backup files, -M Restore the backup to the hypervisor manager, -r Restore the backup, -T List tasks related to the backup, -gb Show backup details]
3
4
usage: brvm -b <GUID> <BP_GUID | BP_NAME> | -B <GUID> <BP_GUID | BP_NAME> <PRIORITY> | -F <GUID> | -gb <BACKUP_GUID> | -gL <BACKUP_FILE_GUID> | -H <GUID>
5
<HV_GUID | HV_HOST> <STORAGE_ID> | -i <VM_GUID> <BP_GUID | BP_NAME> | -I <VM_GUID> <BP_GUID | BP_NAME> <PRIORITY> | -l | -L <GUID> | -M <GUID>
6
<HVM_GUID | HVM_HOST> <STORAGE_ID> <[CLUSTER_ID]> | -r <GUID> <NODE_GUID | NODE_NAME> <DIRECTORY> | -T <GUID>
7
VM backup & restore
8
-b,--backup <GUID> <BP_GUID | BP_NAME> Backup (full)
9
-B,--backup-with-priority <GUID> <BP_GUID | BP_NAME> <PRIORITY> Backup (full) with task priority (0-100, 50 = default)
10
-F,--list-file-systems <GUID> List file systems
11
-gb,--show-backup-details <BACKUP_GUID> Show backup details
12
-gL,--show-files-details <BACKUP_FILE_GUID> Show file details
13
-H,--restore-to-hv <GUID> <HV_GUID | HV_HOST> <STORAGE_ID> Restore the backup to the hypervisor. For KVM mixed volumes please provide
14
storages in form of BF_GUID=STORAGE_ID with files separated by semicolon, i.e. "BF_GUID=STORAGE_ID; BF_GUID2=STORAGE_ID2 ..."
15
-i,--backup-inc <VM_GUID> <BP_GUID | BP_NAME> Backup VM (incremental)
16
-I,--backup-inc-with-priority <VM_GUID> <BP_GUID | BP_NAME> <PRIORITY> Backup VM (incremental) with task priority (0-100, 50 = default)
17
-l,--list List backups
18
-L,--list-files <GUID> List backup files
19
-M,--restore-to-hvm <GUID> <HVM_GUID | HVM_HOST> <STORAGE_ID> <[CLUSTER_ID]> Restore the backup to the hypervisor manager
20
-r,--restore <GUID> <NODE_GUID | NODE_NAME> <DIRECTORY> Restore the backup
21
-T,--list-tasks <GUID> List tasks related to the backup
Copied!

Examples

  • To list all backups and their status:
    1
    vprotect brvm -l
    Copied!
  • To show backups of a particular VM:
    1
    vprotect vm -L 0f36f40c-6427-4035-9f2b-1ead6aca3597
    Copied!
  • To show files that a specific backup consists of:
    1
    vprotect brvm -L 4f1c7907-72e9-4797-8470-3f1fbb081751
    Copied!
  • To show detected file systems in specific backup:
    1
    vprotect brvm -F 4f1c7907-72e9-4797-8470-3f1fbb081751
    Copied!
  • To create a full backup of a VM and store it in backup destination called MyTSM
    1
    vprotect brvm -b 0f36f40c-6427-4035-9f2b-1ead6aca3597 MyTSM
    Copied!
  • To restore a full backup with given GUID on the current node (this) to the /vprotect_data
    1
    vprotect brvm -r 2132182d-e9ab-4478-a1db-48222b0e515b this /vprotect_data
    Copied!
  • To create an incremental backup (Citrix only) of a VM and store it in backup destination called MyTSM
    1
    vprotect brvm -i 0f36f40c-6427-4035-9f2b-1ead6aca3597 MyTSM
    Copied!
  • To restore VM backup (first GUID) to the hypervisor (second GUID - Citrix XenServer only) and specific storage
    1
    vprotect brvm -H 2132182d-e9ab-4478-a1db-48222b0e515b c93140b8-a898-4aff-8eef-645587ca8289 "Local storage"
    Copied!

Storage backup/restore

This module is used to manage the backup and restore process of storage providers.
To invoke backup and restore tasks use vprotect brst sub-command.
1
[[email protected] vprotect]# vprotect brst
2
Incorrect syntax: Missing required option: [-b Backup (full), -B Backup (full) with task priority (0-100, 50 = default), -r Restore the backup, -S Restore the storage to the storage provider., -T List tasks related to the backup, -gL Show file details, -i Backup STORAGE (incremental), -I Backup STORAGE (incremental) with task priority (0-100, 50 = default), -gb Show backup details, -l List backups, -L List backup files]
3
4
usage: brst -b <GUID> <BP_GUID | BP_NAME> | -B <GUID> <BP_GUID | BP_NAME> <PRIORITY> | -gb <BACKUP_GUID> | -gL <BACKUP_FILE_GUID> | -i <STORAGE_GUID> <BP_GUID | BP_NAME> | -I <STORAGE_GUID> <BP_GUID | BP_NAME> <PRIORITY> | -l | -L <GUID> | -r <GUID> <DIRECTORY> | -S <GUID>
5
<STORAGE_PROVIDER_GUID | STORAGE_PROVIDER_NAME> <RESTORE_PATH> | -T <GUID>
6
Storage backup & restore
7
-b,--backup <GUID> <BP_GUID | BP_NAME> Backup (full)
8
-B,--backup-with-priority <GUID> <BP_GUID | BP_NAME> <PRIORITY> Backup (full) with task priority (0-100, 50 = default)
9
-gb,--show-backup-details <BACKUP_GUID> Show backup details
10
-gL,--show-files-details <BACKUP_FILE_GUID> Show file details
11
-i,--backup-inc <STORAGE_GUID> <BP_GUID | BP_NAME> Backup STORAGE (incremental)
12
-I,--backup-inc-with-priority <STORAGE_GUID> <BP_GUID | BP_NAME> <PRIORITY> Backup STORAGE (incremental) with task priority (0-100, 50 = default)
13
-l,--list List backups
14
-L,--list-files <GUID> List backup files
15
-r,--restore <GUID> <DIRECTORY> Restore the backup
16
-S,--restore-to-storage-provider <GUID> <STORAGE_PROVIDER_GUID | STORAGE_PROVIDER_NAME> <RESTORE_PATH> Restore the storage to the storage provider.
17
-T,--list-tasks <GUID> List tasks related to the backup
Copied!

Examples

  • To list all backups and their status:
    1
    vprotect brst -l
    Copied!
  • To show backups of a particular storage:
    1
    vprotect br -L 0f36f40c-6427-4035-9f2b-1ead6aca3597
    Copied!
  • To show files that a specific backup consists of:
    1
    vprotect brst -L 4f1c7907-72e9-4797-8470-3f1fbb081751
    Copied!
  • To create a full backup of a storage and store it in backup destination called MyTSM
    1
    vprotect brst -b 0f36f40c-6427-4035-9f2b-1ead6aca3597 MyTSM
    Copied!
  • To restore a full backup with given GUID on the current node (this) to the /vprotect_data
    1
    vprotect brst \
    2
    -r 2132182d-e9ab-4478-a1db-48222b0e515b this /vprotect_data
    Copied!
  • To create an incremental backup of a storage and store it in backup destination called MyTSM
    1
    vprotect brst -i 0f36f40c-6427-4035-9f2b-1ead6aca3597 MyTSM
    Copied!

Mounted backups

Mounted backup management module is used to mount and unmounts backups on the given node. This feature is currently supported for RHV/oVirt/OVM VMs. Each mounted backup can be mounted automatically (auto-detection of mount points within single root or manually with separate mount points for each volume.
To invoke mount/unmount tasks use vprotect mnt sub-command.
1
[[email protected] ~]# vprotect mnt
2
Incorrect syntax: Missing required option: [-T List tasks related to the mounted backup, -u Unmount previously mounted backup, -F List file systems, -l List mounted backups, -L List mounted files, -mi Mount iSCSI., -m Mount backup according to the MOUNT_SPECIFICATION, -Li List files for selected backup, that can be mounted using iSCSI mode.]
3
4
usage: mnt -F <GUID> | -l | -L <GUID> | -Li <BACKUP_GUID> | -m <GUID> <NODE_CONFIG_GUID | NODE_CONFIG_NAME> <auto|manual> <MOUNT_SPECIFICATION> | -mi <BACKUP_GUID> <NODE_CONFIG_GUID | NODE_CONFIG_NAME> <ALLOWED_CLIENT,...,ALLOWED_CLIENT> <DISK_GUID,...,DISK_GUID> | -T <GUID> | -u <GUID>
5
Mounted backup management
6
-F,--list-file-systems <GUID> List file systems
7
-l,--list List mounted backups
8
-L,--list-files <GUID> List mounted files
9
-Li,--list-iscsi-mountable-files <BACKUP_GUID> List files for selected backup, that can be mounted using iSCSI mode.
10
-m,--mount <GUID> <NODE_CONFIG_GUID | NODE_CONFIG_NAME> <auto|manual> <MOUNT_SPECIFICATION> Mount backup according to the MOUNT_SPECIFICATION
11
-mi,--mount-iscsi <BACKUP_GUID> <NODE_CONFIG_GUID | NODE_CONFIG_NAME> <ALLOWED_CLIENT,...,ALLOWED_CLIENT> <DISK_GUID,...,DISK_GUID> Mount iSCSI.
12
-T,--list-tasks <GUID> List tasks related to the mounted backup
13
-u,--unmount <GUID> Unmount previously mounted backup
Copied!

Examples

  • To list all mounted backups:
    1
    vprotect mnt -l
    Copied!
  • To list all mounted files used by mounted backup with GUID 1ac068d3-4848-4c98-b30b-54ce050b6a95 (note that this is mounted backup GUID not a backup GUID):
    1
    vprotect mnt -L 1ac068d3-4848-4c98-b30b-54ce050b6a95
    Copied!
  • To show detected file systems in specific backup:
    1
    vprotect mnt -F 1ac068d3-4848-4c98-b30b-54ce050b6a95
    Copied!
  • To mount all file systems in backup with GUID 2132182d-e9ab-4478-a1db-48222b0e515b and node config with GUID 3a9d48dc-e48f-11eb-a1ce-005056a6b7e5 to /mnt/myVM/2017-01-01:
    1
    vprotect mnt -m 2132182d-e9ab-4478-a1db-48222b0e515b 3a9d48dc-e48f-11eb-a1ce-005056a6b7e5 auto /mnt/myVM/2017-01-01
    Copied!
  • To mount manually file systems in backup with GUID 2132182d-e9ab-4478-a1db-48222b0e515b with specifying mount points you need to provide semicolon-separated list where you provide name of the volume=mount point (white space before or after semicolon or equal sign is not allowed)
    1
    vprotect mnt -m 2132182d-e9ab-4478-a1db-48222b0e515b manual "/dev/sda1=/mnt/myVM/sda1;/dev/vg_sda/lv_root=/mnt/myVM/lv_root"
    Copied!
  • To unmount mounted backup with GUID 1ac068d3-4848-4c98-b30b-54ce050b6a95:
    1
    vprotect mnt -u 1ac068d3-4848-4c98-b30b-54ce050b6a95
    Copied!

Tasks

Task management module is used to show and cancel tasks being executed. You can also monitor progress of the tasks.
Note:
  • tasks in the queue are run in the order from the highest to the lowest priority.
  • queue is being periodically cleaned, so only last tasks are being shown
To manage tasks use vprotect task sub-command.
1
[[email protected] ~]# vprotect task
2
Incorrect syntax: Missing required option: [-Q List queued tasks, -R List running tasks, -d Delete/cancel task, -F List finished (including failed) tasks, -g Show task details, -l List tasks (this node only), -L List tasks (all nodes and not assigned to any node)]
3
4
usage: task -d <GUID> | -F | -g <GUID> | -l | -L | -Q | -R
5
Task management
6
-d,--delete <GUID> Delete/cancel task
7
-F,--list-finished List finished (including failed) tasks
8
-g,--details <GUID> Show task details
9
-l,--list List tasks (this node only)
10
-L,--list-all List tasks (all nodes and not assigned to any node)
11
-Q,--list-queued List queued tasks
12
-R,--list-running List running tasks
Copied!

Examples

  • To list tasks assigned to the current node:
    1
    vprotect task -l
    Copied!
  • To list all tasks in the system:
    1
    vprotect task -L
    Copied!
  • To show task details:
    1
    vprotect task -g 091d623d-edea-490f-8b3b-da30c09a3f93
    Copied!
  • To cancel the task with ID 091d623d-edea-490f-8b3b-da30c09a3f93:
    1
    vprotect task -d 091d623d-edea-490f-8b3b-da30c09a3f93
    Copied!
Note: some tasks may require to be finished before they are cancelled, i.e. export VM from the hypervisor – after cancellation it may take some time for task to process cancel request and clean up snapshots etc. if necessary - backup will be marked as failed.

Project

Project module is used to view details and set quota for available projects.
1
[[email protected] vprotect]# vprotect project
2
Incorrect syntax: Missing required option: [-g Show Project details, -l List Projects, -sQ Set Project Quota]
3
4
usage: project -g <GUID> | -l | -sQ <GUID> <QUOTA_GUID>
5
Project management
6
-g,--details <GUID> Show Project details
7
-l,--list List Projects
8