How to use rsync to backup and synchronize files to USB drive

Portable USB drive (sometimes called pendrive) has gained popularity as a medium for storing documents. Computer users would work on the files that they store on the usb drive and occasionally would copy them on their computer, or vice versa.

However this would cause problems if there’s a lot of files being worked on and transfered between usb drive and computers. Valuable time might be lost solely for identifying which of the files are more recent and need to be updated.

Fortunately there’s ‘rsync’, a tool which can be used to synchronize files between the computer and usb drive. Assuming you use Debian or Ubuntu, you only need to start ‘synaptic’ and select ‘rsync’ package. Once installed, start the terminal application and you can begin synchronizing the files using this command


$ rsync -r -vv /home/username/Documents/ /media/your_usb_drive

The general format of rsync command is :

$ rsync -r -vv <local document directory> <remote backup directory>

rsync only updates file which has been changed and would save time and precious harddisk space from maintaining duplicate files.

A Windows version is also available at : http://www.rsync.net/resources/binaries/cwRsync_3.1.0_Installer.zip

Ubuntu Tutorial Video from Screencast.Ubuntu.com

Reading through dozens of paragraphs, just to learn the basics of Ubuntu can be tedious, especially for those who don’t have much time on their hands to figure out about Ubuntu software repositories system. The good news is, they no longer have to read through articles full of vague descriptions anymore, instead they can get visual tutorial from Ubuntu Screencasts website!

The video listed on the website covers popular topics that would be asked by Ubuntu newcomers and is very easy to follow as it has narration. The videos are also available in high quality downloads (1280×720 resolutions) in several common media formats (flv, ogg, mp4).

The site is also updated weekly, and is one of Ubuntu sites that you shall not miss – Ubuntu Screencasts

How to setup Secure Webserver HTTPS (SSL) on Apache in Ubuntu

Secure HTTP (SSL/TLS) has become a must if you are planning to setup a website which includes user authentication (ie. login box) or sensitive data. HTTPS prevents the sensitive data from being transfered across the network in clear text where it is susceptible to being sniffed or altered. Here is the tutorial on how to setup a secure HTTP on Apache web server in Ubuntu 10.04 (Lucid Lynx).

What do you need?

  • apache2 (Web Server)
  • openssl
  • A bit patient, because it will take some time to learn

Step 1: Create a self-signed certificate
You need to create a self-signed certificate with openssl. To do that you will need to generate the server key.


openssl genrsa -des3 -out server-sec.key 4096

…and certificate signing request (CSR)


openssl req -new -key server-sec.key -out server.csr

After that, generate the server certificate by signing it with the server key.

openssl x509 -req -days 365 -in server.csr -signkey server-sec.key -out server.crt

Keep the server-sec.key in a secure location, with read/write permission assigned only to root. Then generate a password-less copy of the key for Apache use.

openssl rsa -in server-sec.key -out server.key

By this time, you should have :

  • server.key (passwordless key for Apache)
  • server.csr (certificate signing request)
  • server.crt (certificate)
  • server-sec.key (server key)

Continue reading “How to setup Secure Webserver HTTPS (SSL) on Apache in Ubuntu”

Linux Mint Debian Edition 201009 has been released!

A few years ago, I wrote about Linux Mint as an unofficial Ubuntu distribution that is preinstalled with proprietary codecs and plugins then I write a follow up article when the project has evolved into providing a user-friendly Linux distribution, with additional application but is still based on Ubuntu.

linux mint debian edition

But now, the Linux Mint teams has taken another step forward by introducing Linux Mint Debian Edition (LMDE), which is based on Debian GNU/Linux distribution (Debian-Testing or Debian Squeeze). LMDE features a new installer which was developed from scratch with Debian in mind, bleeding-edge application from the Debian-testing repos and the same proprietary software addons from Linux Mint own repositories.

LMDE is however is not compatible with Ubuntu repositories as there are differences between the binary and the configuration files. Those who are seeking for full compatibility with Ubuntu, should download Linux Mint standard edition instead. Another caveat is, LMDE currently is only available on 32 bit X86 platform and GNOME, with no immediate plan to release 64bit edition or with KDE environment, due to complications with the process of making Debian much more ‘friendlier’ to keep up with Linux Mint standards.

linux mint debian thumbnail screenshot

LMDE can be downloaded from its official website : http://www.linuxmint.com/download_lmde.php, it comes with a DVD ISO image (875 MB)

3 ways to get Linux release information from bash terminal

Let’s say you’ve manage to get yourself into a GNU/Linux bash terminal. What can you do in order to determine its distro and release information? Listed here are the three methods to get release information of a running GNU/Linux box.

lsb_release method
You can type “lsb_release -a”

Cat /etc/proc/release method

/etc/*release and /etc/*issue method
Alternatively, you could try typing “cat /etc/*release” or “cat /etc/*issue”.

Cat /etc/proc/release method

/proc/version method
If else fails, you could always try the “cat /proc/version” method to see where the kernel came from.

Cat /etc/proc/release method

Hope this would help!