How to update the Ubuntu distribution on the CPM instance

How to update the Ubuntu distribution on the CPM instance

Before starting it is recommended to take backup of cpmdata volume and be familiar with how to restore the server.


In order to update the Ubuntu distribution on the CPM instance, you have to follow these instructions precisely (when no backup/DR is running):


1) Connect with SSH (using the user "cpmuser" and your private key).

 

2) Type:

sudo apt-get update

sudo apt-get dist-upgrade

 

3) Stay with the default (simply click "enter")  to any command line prompt question you get - very important!

If you do not accept the default answers, or use wrong apt-get commands, MySQL may stop functioning:

If this happened, to get back up and running, please follow the "upgrade" instructions in chapter 1.4 "Upgrading N2WS" in our User Guide at https://docs.n2ws.com/user-guide/#1-4-upgrading-n-2-ws


4) The update process may create the /etc/mysql/debian.cnf file, which contains a clear text password for the user "debian-sys-maint".
We recommend to change this password and delete this file after the update:
mysql -u debian-sys-maint -p%oldpassword%
(replace %oldpassword% with the password listed in /etc/mysql/debian.cnf)

SET PASSWORD = PASSWORD('%newpassword%');
(replace %newpassword% with the  new password)

exit
(to exit from MySQL)

sudo rm /etc/mysql/debian.cnf
Now the password is no longer the default one, and it's not contained in clear text form anywhere.


5) At the end reboot the instance via the EC2 console or by using the command:
sudo reboot






    • Related Articles

    • CPM and "Dirty COW" Linux vulnerability

      In order to fix the "Dirty COW" vulnerability, please follow these instructions: https://support.n2ws.com/portal/kb/articles/how-to-update-the-ubuntu-distribution-on-the-cpm-instance
    • How to upgrade an N2WS server from Ubuntu 22.04 to Ubuntu Pro

      Before starting, make sure you know how to redeploy the server in case of issues during OS upgrade. In addition, Linux knowledge is Required. There are additional costs charged by AWS when using Ubuntu Pro, see this link for pricing details. Warning: ...
    • How to upgrade CPM using a patch

      Please note: upgrading using patch does not upgrade Apache/OS General: 1. It is recommended to deploy the patch when you have no active backup policies, DR or recovery running - as it will restart Apache and require few min downtime. 2. When using ...
    • Release notes for the latest v2.6.x CPM release

      In order to upgrade to v2.6.x from any version, please use the AMI upgrade method . The upgrade instructions are in the chapter 1.3.5 "Upgrading the N2WS Server Instance" at https://n2ws.com/support/documentation/introduction-to-cpm#13 In order to ...
    • Upgrade instructions for v3.x/4.x

      This guide outlines the steps required to upgrade to N2WS Backup & Recovery version 3.x/4.x We strongly recommend that you follow every step contained within this guide to ensure version 3.x/4.x is configured correctly and no data loss occurs. ...