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

ISSUE

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

RESOLUTION

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. 

TASKS

Safety Check

dpu asset;dpu version;uptime;rpm -qa | grep unitrends | sort;grep -i 'END upgrade of unitrends-rr' /var/log/install-rr.log

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 bp.systems"

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

BEFORE UPDATING:  If the UI is already indicating the trap that a reboot is pending from a prior update 

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:

SSH_DPU_Update_Monitoring.jpg

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
unitrends-agent-dca-hyperv-10.7.11-1.202312040911.CentOS7.noarch
unitrends-agentpush-win64-10.7.11-1.202311291912.noarch
unitrends-aprotect-10.7.11-1.202312040858.CentOS7.x86_64
unitrends-baremetal-10.0.0-10.201901041559.CentOS5.i386
unitrends-baremetal-utils-10.0.0-0.201705311325.CentOS5.i386
unitrends-cloudhook-10.7.11-1.202312040858.CentOS7.x86_64
unitrends-cloudutil-10.7.11-1.202312040858.CentOS7.x86_64
unitrends-common-10.7.11-1.202312040858.CentOS7.x86_64
unitrends-config-vm-2.0.2-0.noarch
unitrends-dca-10.7.6-1.202311271924.CentOS7.x86_64
unitrends-doc-10.7.11-2.202311300830.noarch
unitrends-drivers-5.21.el7-202303081426.x86_64
unitrends-elk-10.7.11-1.202311241425.CentOS7.x86_64
unitrends-helix-10.7.11-1.202312040858.CentOS7.x86_64
unitrends-ipmi-10.7.11-1.202312040858.CentOS7.x86_64
unitrends-monitoring-10.7.11-1.202312040858.CentOS7.noarch
unitrends-ndmp-10.7.11-1.202312040858.CentOS7.x86_64
unitrends-rdr-10.7.6-1.202311271924.CentOS7.x86_64
unitrends-release-7-9.2009.3.el7.centos.x86_64
unitrends-repqueuer-10.7.8-1.202308150800.CentOS7.x86_64
unitrends-rr-10.7.11-1.202312040858.CentOS7.x86_64
unitrends-rr-windowmgr-10.6.6-3.202208121929.CentOS7.x86_64
unitrends-security-10.7.11-1.202312040858.CentOS7.x86_64
unitrends-snmp-10.7.11-1.202312040858.CentOS7.x86_64
unitrends-ui-10.7.11-1.202311301522.CentOS7.noarch
unitrends-vprotect-10.7.11-1.202312040858.CentOS7.x86_64
unitrends-winbm-10.7.11-1.202311291912.noarch
unitrends-xprotect-10.7.11-1.202312040858.CentOS7.x86_64

Most packages should be the current release.  Note the drivers, vm config, and OS Release will differ, we have not incremented legacy BRM rpms since 10.0.0, and DCA, RDR and RepQueuer are not updated every release, but all other packages should be current and have no duplicates on older versions. 


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.

 

BEFORE REBOOT!!!!!

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 

[root@train-t1-c7 ~]# ps aux | grep after
root 10674 0.0 0.0 112812 976 pts/1 S+ 07:39 0:00 grep --color=auto after

[root@train-t1-c7 ~]# ps aux | grep yum
root 11344 0.0 0.0 112812 976 pts/1 S+ 07:39 0:00 grep --color=auto yum

NOTES

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
}

 

Troubleshooting

 

/var/log/yum.log

/var/log/install-rr.log

 

Have more questions?

Contact us

Was this article helpful?
2 out of 2 found this helpful

Provide feedback for the Documentation team!

Browse this section