Posts Tagged ‘Debian’

How to convert RPM software packages to Debian (.deb)

Thursday, March 4, 2010 posted by Till

Maybe you had this problem already: you use Debian or Ubuntu Linux and a software package that you like to install is only available in RPM format. The solution is a handy tool called alien, which converts .rpm files to .deb.  Installing alien:


apt-get install alien


Converting a rpm package to debian format:


alien --to-deb /tmp/mysoftwarefile.rpm


Conversions from .deb to rpm are also possible:


alien --to-rpm /tmp/mysoftwarefile.deb

Sometimes you need to know which debian package contains a specific file e.g. because you deleted a system file accidently or you try to install a new software that requires this file. The apt package management utility which is used in Debian and Ubuntu comes with a handy tool called apt-file which allows a saerch for filenames in the package database.

Install apt-file

apt-get install apt-file


Update the apt-file database

apt-file update


Search for a specific file name, e.g. “lcrypto”

apt-file search /bin/bash


apt-file search /bin/bash bash: /bin/bash bash: /usr/bin/bashbug bash-minimal: /bin/bash-minimal bash-static: /bin/bash-static bashdb: /usr/bin/bashdb mybashburn: /usr/bin/bashburn

Backing up OpenVZ virtual machines with vzdump

Tuesday, August 4, 2009 posted by Till

Vzdump is a perl script that makes live backups of OpenVZ virtual machines very easy. The following steps are for Debian Linux but vzdump can be used on all other linux distributions. Only the installation may vary.

Download and install vzdump from http://download.openvz.org/contrib/utils/vzdump/

cd /tmp wget http://download.openvz.org/contrib/utils/vzdump/vzdump_1.1-2_all.deb dpkg -i vzdump_1.1-2_all.deb Create the backup directory <p class="command">mkdir /home/backup

Create a backup of all virtual machines as compressed (tar.gz) archive and send a email report to the root user when finished.

vzdump --dumpdir /home/backup --suspend --compress --mailto root --all

vzdump can also be used to restore a backup.  Example: restore the backup of the virtual machine 101:

vzdump --restore /home/backup/vzdump-101.tgz 101

To restore the backup to a different virtual machine, you can specify a differnt target ID. E.g. restore the backup of vm 101 to the virtual machine with the ID 500:

vzdump --restore /home/backup/vzdump-101.tgz 500

To turn on verbose logging (e.g. to debug FTP connection or authentication problems) in  pure-ftpd FTP server on Debian and Ubuntu Linux, execute the following command as root user in the shell:

echo 'yes' &gt; /etc/pure-ftpd/conf/VerboseLog

and then restart pure-ftpd

/etc/init.d/pure-ftpd-mysql restart

The debug output will be logged to syslog. To view the log content, execute:

tail -n 100 /var/log/syslog

To disable verbose logging, execute these commands:

rm -f /etc/pure-ftpd/conf/VerboseLog
/etc/init.d/pure-ftpd-mysql restart