r1soft-cki throws “relocation error”

After installing CDP agent on a debian server, I started getting following error while I tried installing kernel modules using r1soft-cki . Error is as follows: relocation error: /lib/libnss_files.so.2: symbol \__rawmemchr, version GLIBC_2.2.5 \ not defined in file libc.so.6 with link time reference Cause: This is caused by a GLIBC version mis-match. The version of [...]


Take backup of running server over ssh with dd

dd is one of the magical commands on Linux box. It has proved itself to be too useful by copying and creating files from disks, iso’s etc.

Now, while we work on some servers to take backup of some drives we use dd command to take disk image. This should be done after mounting the file system as read-only. Otherwise you might end up getting a corrupted image of the disk. You can remount the entire file system of Linux using following command.

#mount -o remount ro /

Now you’re all set to take the image of this system. As the file system has been mounted as read-only, new files won’t get created and you’re in a safer zone to continue further with this task.

Following command is the syntax for taking the backup of a disk called /dev/sda over ssh using dd. "if" takes the disk as argument from which data needs to be read. Target is the server name or ip of the server to which image needs to be written. In the following command backup.img is being written into /root folder of a remote system.

#dd if=/dev/sda | ssh root@target "(cat >/root/backup.img)"

This will be very handy for administrators who end up facing some disk issues on servers which they manage and disks etc fail to work. Before proceeding with disaster recovery process, they might have to take the backup existing server without taking it down. If you face the similar situation, don’t forget to use dd.

Visit this link for more inputs on dd.

Caution: *(Be careful with options etc with dd, you might end-up writing the data to wrong disk or location)