How to safely update the Unitrends appliance from the SSH Command Line Interface


The unitrends-cli command should be used to perform command line updates of the Unitrends appliance.


Use the unitrends-cli commands performs routines before and after the software update which ensure data integrity.

Note: Not all rpm packages are updates with every release. 


Safety Check

dpu asset;dpu version;uptime;rpm -qa | grep unitrends | sort;grep "END upgrade of unitrends-rr"

Check /var/log/install-rr.log

Run screen -ls to see if there are any other screens that may be doing things

Check df -hP for Var 

Check if /etc/hosts for replication if a target is up 

Check the Target update value in the Database (you might also need to check on the Target)

psql -U postgres bpdb -c "select * from"

psql -U postgres bpdb -c "select target_id,url_name,target,target_version,status,local_block_elimination,is_active,is_suspended_by_source,suspend_toggled_by_source,credential_id from bp.source_replication_config"


Start Task

First, enter a "screen session" to ensure that the update process is not disrupted by a communication loss with your SSH session.

[root@UMyUnitrendsDPU ~]# screen

If the session is broken, the work will continue in the background, and you can return to the process by executing the command screen -x.

Now, it is safe to run the next command, which begins the update process. There are no updates during the proceedure, but at the end it will provide an output of the results. You will now execute the command unitrends-cli post updates

[root@MyUnitrendsDPU ~]# yum clean all
[root@MyUnitrendsDPU ~]# dpu repo refresh
[root@MyUnitrendsDPU ~]# unitrends-cli post updates

How to Monitor the Update

To monitor the appliance update progress, please run the below command on another Appliance SSH session

[root@MyUnitrendsDPU ~]# watch -d -n 5 "uptime;echo "Current Date and Time: `date`";echo "Hostname: `hostname`";dpu asset;dpu version;ps -ae --sort=-command|grep -v grep|grep -v 'idle\|ndmp/ndmpd\|dpuconfig '|grep -i 'yum\|repo\|updates\|xfs_r\|upgrade\|after\|"PID TTY"'" 

watch -d -n 5 "uptime;echo "Current Date and Time: `date`";echo "Hostname: `hostname`";dpu asset;dpu version;ps -ae --sort=-command|grep -v grep|grep -v 'idle\|ndmp/ndmpd\|dpuconfig '|grep -i 'yum\|repo\|updates\|xfs_r\|upgrade\|after\|"PID TTY"'"

The output will look something like this:


Any value that turns white means it changed its value since. The portion under the column header (PID TTY TIME CMD) reflects work being done related as part of the update process.


Note:- As long as there are items displayed under the column header, please do not administer or reboot the Unitrends appliance. The appliance is done updating when you see the Version value change the current release AND there are no longer any commands under the column header.

To confirm the update was successful, review the unitrends rpms using the command below. Confirm that the unitrends-rr package is running the latest software version.

root@MyUnitrendsDPU ~]# rpm -qa | grep unitrends | sort

Once this is all completed, by execute the following command to terminate the screen session: exit

root@MyUnitrendsDPU ~]# exit

You can now close the session or type and execute the exit command again and it will be done for you.



Run  ps aux | grep after and ps aux | grep yum check 5 times searching only a single line return consistently 


On CentOS6

[root@Health-604-50055 ~]# ps aux | grep after
root 30274 0.0 0.0 103320 900 pts/1 S+ 09:45 0:00 grep after

[root@Health-604-50055 ~]# ps aux | grep yum
root 31839 0.0 0.0 103320 904 pts/1 S+ 09:53 0:00 grep yum

On CentOS7 

(To be added later. Will return just a single line about color = Red)


Not all rpm packages are updates with every release. Below is an example of a successful update.

In the example below, the Unitrends Backup Enterprise virtual appliance was updated from 10.4.3-2 to 10.4.4-3

[root@UB107COS6 ~]# unitrends-cli post updates
    "result": [
            "message": "<pre>Status of specified packages:\nInstalled: unitrends-ui-10.4.4-1.202004162020.CentOS6.noarch\nInstalled: unitrends-monitoring-10.4.4-3.202004291840.CentOS6.noarch\nInstalled: unitrends-elk-10.4.4-1.202004162019.CentOS6.x86_64\nInstalled: xg-portal-client-3.0.2-1.202004132046.CentOS6.noarch\nInstalled: unitrends-rr-windowmgr-10.4.4-3.202004291840.CentOS6.x86_64\nInstalled: unitrends-snmp-10.4.4-3.202004291840.CentOS6.x86_64\nInstalled: unitrends-agentpush-win32-10.4.4-3.202004291838.CentOS6.noarch\nInstalled: winexe11-1.1-6.el6.x86_64\nInstalled: unitrends-cloudhook-10.4.4-3.202004291840.CentOS6.x86_64\nInstalled: unitrends-common-10.4.4-3.202004291840.CentOS6.x86_64\nInstalled: unitrends-aprotect-10.4.4-3.202004291840.CentOS6.x86_64\nInstalled: unitrends-ipmi-10.4.4-3.202004291840.CentOS6.x86_64\nInstalled: unitrends-ndmp-10.4.4-3.202004291840.CentOS6.x86_64\nInstalled: unitrends-vprotect-10.4.4-3.202004291840.CentOS6.x86_64\nInstalled: unitrends-doc-10.4.4-2.202004140830.noarch\nInstalled: unitrends-security-10.4.4-3.202004291840.CentOS6.x86_64\nInstalled: unitrends-winbm-10.4.4-3.202004291838.CentOS6.noarch\nInstalled: unitrends-config-vm-2.0.2-0.noarch\nInstalled: unitrends-rr-10.4.4-3.202004291840.CentOS6.x86_64\nInstalled: unitrends-agentpush-win64-10.4.4-3.202004291838.CentOS6.noarch\nInstalled: unitrends-repqueuer-10.4.4-1.202004161929.CentOS6.x86_64\nInstalled: unitrends-agentpush-winBM-10.4.4-3.202004291838.CentOS6.noarch\nInstalled: unitrends-xprotect-10.4.4-3.202004291840.CentOS6.x86_64\n</pre>"
    "timestamp": 1588765625







Was this article helpful?
1 out of 1 found this helpful
Have more questions? Contact us