Install the Backup and DR agent on a Linux host

This page describes how to install Backup and DR agent on a Linux host and perform other operations such as how to regenerate a secret key, check the Backup and DR agent status, and restart the Backup and DR agent.

How it works

The Backup and DR agent for Linux runs as a daemon process under username root. It listens on TCP port 5106 for communication from the backup/recovery appliance. The agent writes to a log file in the installation directory /var/act/log/UDSAgent.log and posts significant events to the /var/log/messages repository.

After installing the agent, you need to initialize trusted communications between the backup/recovery appliance and the Backup and DR agent. This only needs to be done once. The secret key needs to be added within two hours of being generated. If the secret key expires, you need to generate a new key.

Install the agent on a Linux host

Use the following instructions to install the agent on a Linux host:

  1. Download the agent installer file, see Obtain the right Backup and DR agent for your host.

  2. Upload the installer file to your Linux server.

  3. To install the agent, choose one of the following:

    • For Linux 32-bit installation, run the following command.

        rpm -ivh connector-Linux_x86-version.rpm
      
    • For Linux 64-bit installation, run the following command.

        rpm -ivh connector-Linux-version.rpm
      
    • For Linux Ubuntu installation, run the following command.

        dpkg -i connector-linux_ubuntu_amd64-version.deb
      

    The agent always installs at /opt/act. When the installation is complete, a secret key displays.

  4. Save the secret key in a notepad or in a text editor, you need to add this in Backup and DR agent section, see Add Linux host.

Regenerate the secret key

The secret key that generates in the Install the Backup and DR agent on a Linux host section is valid only for two hours. You need to add it to the management console within this timeframe or generate a new one.

Use the following instructions to generate a new key and add it to the management console.

  1. On the Linux host, log in as a root user and run either of the commands in the directory:

    • To reset the secret key after confirmation the action, run the following command:

        /opt/act/bin/udsagent secret --reset
      
    • To reset the secret immediately without confirmation, run the following command:

        /opt/act/bin/udsagent secret --reset --restart
      
  2. Save the secret key in a notepad or in editor. This secret key is valid for two hours.

Add a secret key

If you want to update the secret key or didn't add the secret key the first time, you can add in the Linux host using the following instructions.

  1. In the management console, select Manage and then select Hosts.

  2. Right-click the Linux host and choose Edit.

  3. Go to Backup and DR agent Settings section and find the Secret text box.

  4. Paste the secret key that you saved earlier in the Secret text box and click Save. Ensure the Certificate status changes to Valid. If you get a partial success message, use the instructions to Validate backup/recovery appliance to Backup and DR agent connectivity.

Check Backup and DR agent status

After the agent is installed, you can verify its status on the Linux hosts using the following commands.

  • On non-system targets (RHEL before 7.0 and SUSE Linux before 12.0), run the following command.

        service udsagent status
    

    The output looks similar to the following for the line udsagent daemon is running:

          service udsagent status
          udsagent daemon is running
    
  • On systemd targets (RHEL 7.0+, SUSE Linux 12.0+, and Ubuntu 16.0+), run the following command:

        systemctl status udsagent
    

    The output looks similar to the following:

        [root@postgres ~]# systemctl status udsagent
        ● udsagent.service - Google Cloud Backup and DR service
           Loaded: loaded (/usr/lib/systemd/system/udsagent.service; enabled; vendor preset: disabled)
        Active: active (running) since Wed 2022-11-09 22:13:45 UTC; 17min age
        Process: 1056 ExecStart=/act/initscripts/udsagent.init start (code=exited, status=0/SUCCESS)
        Main PID: 1128 (udsagent)
           CGroup: /system.slice/udsagent.service
                   ├─1128 /opt/act/bin/udsagent start
                   └─1132 /opt/act/bin/udsagent start
    
        Nov 09 22:13:44 postgres systemd[1]: Starting Google Cloud Backup and DR service…
        Nov 09 22:13:45 postgres udsagent.init[1056]: Starting /opt/act/bin/udsagent as a daemon. It may take a few minutes for the service to start completely.
        Nov 09 22:13:45 postgres udsagent.init[1056]: Starting /opt/act/bin/udsagent as a daemon. It may take a few minutes for the service to start completely.
    

Restart the Backup and DR agent on a Linux host

To restart the Backup and DR agent on a Linux host, execute the following command on the host.

  • For Non-systemd (RHEL before 7.0 and SUSE Linux before 12.0) hosts, run the following command:

        /etc/init.d/udsagent restart
    
  • For Systemd (RHEL 7.0+, SUSE Linux 12.0+, and Ubuntu 16.0+) hosts, run the following command:

      systemctl restart udsagent
    

Uninstall the Backup and DR agent from a Linux host using the command line

Use the following instructions to uninstall the Backup and DR agent from a Linux host:

CentOS/RHEL/SLES

  1. Log in as a root user and stop the Backup and DR agent by running the following command:

    systemctl stop udsagent
    

    For older Linux versions you may need to use the following command:

    /etc/init.d/udsagent stop
    
  2. Check the currently installed Linux Backup and DR agent RPM name with the following command:

    yum list installed | grep udsagent
    

    You can also use the following command to check the RPM name:

    rpm -qa udsagent
    

    The output looks similar to the following:

    udsagent-11.0.1-8756.x86_64
    
  3. Uninstall the package using the name you obtained from the query. For example:

    yum remove udsagent-11.0.1-8756.x86_64
    

    You can also use the following command to uninstall the package:

    rpm -e udsagent-11.0.1-8756.x86_64
    

Ubuntu

  1. Log in as a root user and stop the Backup and DR agent by running the following command:

    systemctl stop udsagent
    
  2. Uninstall the agent using the following command:

    dpkg --remove udsagent
    

What's next