kernel module installer failed. (0) – R1Soft – Could not find a suitable hcpdriver module for your system – How to install CDP Agent Kernel Module in Ubuntu

There are times, you may end up with the following error, when you are trying to install R1Soft hcp module or the kernel module in Ubuntu based servers:

kernel module installer failed. (0) - R1Soft - Could not find a suitable hcpdriver module for your system - Ubuntu

Full error could be like the following when you call for –get-module

root@hisab:/lib/modules/r1soft# serverbackup-setup --get-module
Building header archive ...
outfile = /tmp/headers881407773
headers = /usr/src/linux-headers-5.4.0-128-generic
Session ID: 379634599
Waiting to upload...
Uploading file...
Waiting in build queue...
Failed to get suitable module for this system: Failed to build module: No builders found.

Get module failed.
Falling back to old get-module ...
Checking if module needs updated
Checking for binary module
Waiting                       /
No binary module found
Gathering kernel information
Gathering kernel information complete.
Creating kernel headers package
Checking '/tmp/r1soft-cki.1667140819' for kernel headers
Found headers in '/tmp/r1soft-cki.1667140819'
Compressing...
Starting module build...
Building                      /          kernel module installer failed. (0):
Internal error encountered. Please contact support
Request ID: (75ca382d-5a0e-4161-8c70-8b136a6b1330)
http://www.r1soft.com/distros/index.php?uuid=75ca382d-5a0e-4161-8c70-8b136a6b1330

To solve this error, you may get the built kernel module for Ubuntu based on it’s distribution in their repository. The link to the repository would be as following:

http://beta.r1soft.com/modules/

Now, if you are using Ubuntu 20.04, then the module would be available under the folder: Ubuntu_2004_x64

In my case, it was Ubuntu 20.04. Next stop, is to find the kernel version. You may get it from the following command:

root@hisab:~# uname -a
Linux hisab.skincafe.co 5.4.0-128-generic #144-Ubuntu SMP Tue Sep 20 11:00:04 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
root@hisab:~#

Kernel number to note in our case, would be ‘5.4.0-128’. Now search for this inside the link:

http://beta.r1soft.com/modules/Ubuntu_2004_x64/

You should find a match, like for my case it was the following link:

http://beta.r1soft.com/modules/Ubuntu_2004_x64/hcpdriver-cki-5.4.0-128-generic.209.ko

Next stop, is to go to the r1soft module folder and load the module. You may do so like the following:

cd /lib/modules/r1soft
wget http://beta.r1soft.com/modules/Ubuntu_2004_x64/hcpdriver-cki-5.4.0-128-generic.209.ko

Now, all you need, is to restart r1soft. Remember to stop and star the agent instead of direct restart.

service cdp-agent stop
service cdp-agent start

This should be able to load the HCP module now. You may verify this by typing:

root@hisab:~# hcp --list
Idera Hot Copy     6.16.4 build 117 (http://www.r1soft.com)
Documentation      http://wiki.r1soft.com
Forums             http://forum.r1soft.com

Thank you for using Hot Copy!
Idera makes the only Continuous Data Protection software for Linux.


No Hot Copy sessions are currently running.
root@hisab:~#

Happy troubleshooting

How to Backup/Dump and Restore PostgreSQL Databases

Here is the situation. We have a customer, who runs a POS backed by PostgreSQL. Customers want a second POS with the updated SQL till last night. Point to note, he didn’t want to use the Master/Replica or Master/Master replication, instead, a day earlier backup to be restored.

A similar situation is probably applicable for developers who are trying to work with staging and production environments and vice versa. In such a situation, you need a technique for dumping and restoring databases.

Backup/Dump Postgresql Databases

To dump the PostgreSQL database, you need to use pg_dump. First ssh to your server, change the user to Postgres, and then run the dump

su - postgres
pg_dump your_database > your_database_2021_13_11.sql

Here, your_database is the name of the database you are trying to dump.

Copy the SQL to the Remote Server

Once the dump is done, now you may copy the SQL file to the remote server. You may do that using rsync:

rsync -vrplogDtH --progress your_database_2021_13_11.sql [email protected]:/var/lib/pgsql/

Replace your_database_2021_13_11.sql with your SQL dump name and ‘ip.ip.ip.ip’ with the IP of your remote destination.

Restore the Dump

Now, ssh to the remote server, and continue with the following command:

# change to postgres user
su - postgres
# drop the old database
psql -c 'drop database your_database;'
# create database (replace your_username with the one you want to use for the database)
psql -c 'create database your_database with owner your_username;'
# restore database
psql your_database < /var/lib/pgsql/your_database_2021_13_11.sql

Once done, you should be able to use the new restored database. Good luck.

How to Backup PostgreSQL Database from Command Line

Question

How to Backup PostgreSQL Database from Command Line

Solution

Postgresql comes with two utilities called ‘pg_dump and ‘pgsql’. These can be used to backup and restore database.

To backup postgresql database using command line, you can use this:

pg_dump database_name > database_name.sql

This would take the backup and store it in .sql file.

To restore postgresql (.sql) file to a database using command line, you can use this:

pgsql database_name &lt; database_name.sql

How much data does Mellowhost have in their Backup?

It should be pretty known if you are a Mellowhost customer that we backup our servers on daily basis. We are currently using R1Soft CDP for each of our servers. All the backup servers are offsite, that means they are not hosted in the same server you are using with Mellowhost and not even in Softlayer network. Continue reading “How much data does Mellowhost have in their Backup?”