≡ Menu

Backup

I've Windows Vista installed as a guest under Ubuntu Linux using VMWARE Workstation 6.0. This is done for testing purpose and browsing a few site that only works with Internet Explorer. Since I only use it for testing I made 16GB for Vista and 5GB for CentOS and 5GB in size for FreeBSD guest operating systems. However, after some time I realized I'm running out of disk space under both CentOS and Vista. Adding a second hard drive under CentOS solved my problem as LVM was already in use. Unfortunately, I needed to double 32GB space without creating a new D: drive under Windows Vista. Here is a simple procedure to increase your Virtual machine's disk capacity by resizing vmware vmdk file.
[click to continue…]

Usually, you do not need to setup an email server under Linux desktop operating system. Most GUI email clients (such as Thunderbird) supports Gmail POP3 and IMAP configurations. But, how do you send mail via the standard or /usr/bin/mail user agents or a shell script? Programs such as sendmail / postfix / exim can be configured as a gmail smarthost but they are largely overkill for this use.
[click to continue…]

Linux: Local / Remote Backup For Large Files

You can easily backup large files using Linux backup software combination - tar, split and md5sum program. From the article:

I have a directory containing some files for a virtual computer. The files that hold the data for the virtual computer's hard discs are not only big, they are also "sparse" files, which means that they use only enough disc space for the data that was actually written to the file. For example, the virtual computer may have a 30GB drive of which 2GB has been used. Even though it uses only 2GB on my hard disc, a program that reads the file may see it as a 30GB file. This type of file can be tricky to back up because, when you copy it, you can end up with a 30GB file, or it might simply fail to copy, depending on the type of file system used on the backup storage.

=> Backing up Large Files

A new variant of Gpcode virus is out and targeting all Windows systems. It is a dangerous file-encryptor. It encrypts a whole variety of user files, targeting files with extensions such as DOC, TXT, PDF, XLS, JPG, PNG, CPP, H etc using rsa encryption. Once file encrypted it displayed following message on screen demanding ransom:

Your files are encrypted with RSA-1024 algorithm.
To recovery your files you need to buy our decryptor.
To buy decrypting tool contact us at: ********@yahoo.com

RSA-1024 algorithm / encryption is pretty strong and any attempt to break it will result in nothing. According to this blog posting it will take 5 million modern computers to crack a key:

Along with antivirus companies around the world, we're faced with the task of cracking the RSA 1024-bit key. This is a huge cryptographic challenge. We estimate it would take around 15 million modern computers, running for about a year, to crack such a key.

This also makes hard drive data recovery difficult. Your best choice against such attack is backup data regularly and move to offsite. Now virus writer using rsa security to black mail you. Any OS (Windows is big target for this kind of attacks) can be open to such attack and only backups can protect you.

Flickr is well know image hosting website, web services and an online community platform for sharing stuff.

FlickerFs

Flickrfs is a virtual filesystem which mounts on your linux machine like any other partition. Once mounted, it retrieves information about your photos hosted on your flickr account, and shows them as files. You can now easily copy photos from your local machine to this mount, and it will automatically upload them to your flickr account. Similary, you can copy the files from your mount to your local machine, and it will download your images from flickr.

Manish has all the information about installing FlickerFS under Linux and Ubuntu computer.

Desktop Flickr Organizer

Desktop Flickr Organizer (DFO) is a flickr photos organizer right on your Linux desktop. helps you store and manage a local backup of your Flickr photos. It also lets you tag, organize, comment on and manage those photos from your desktop.


(Fig. 01: DFO in action)

=> Download DFO software (via Wired how to wiki)

This is an excellent backup utility for new Linux user.

Apple's Time Machine is a great feature in their OS, and Linux has almost all of the required technology already built in to recreate it. This is a simple GUI to make it easy to use.

Time Machine, like many backup utilities, creates incremental backups of files which can be restored at a later date. It also supports limited restoration of files within applications that are specifically programmed to use Time Machine's functionality.
FlyBack: a Time Machine backup utility for Linux
(Fig. 01: Linux FlyBack Software in Action)

Download and Installation instructions

=> FlyBack - Apple's Time Machine for Linux (via Bernaz's Weblog)

Rotate FTP Backup Using a Shell Script

I've already written about rotating sftp / ssh backup shell script to remove directories (old backup files). However, a few of our readers would like to know more about removing old backup directories using ftp. As usual, you need accurate date and time on local system and remote backup directory must be in dd-mm-yyyy or mm-dd-yyyy format. For example daily mysql backup should be stored in /mysql/dd-mm-yyyy format.

Sample Shell Script

Here is a simple and dirty shell script to remove old backups ( download link ):

#!/bin/bash
# call ./script.sh 03-2007 - to remove all March-2007 directories in 01-03-2007, 02-03-2007, 31-03-2007 format
# you must have ncftp ftp client installed on BSD / Linux box
BASE="/mysql" # base dir below that dd-mm-yyyy
[ $# -eq 0 ] && exit 1 || :
DELETE="$1"
echo "Getting old directories..."
ncftpls -u 'ftp-user-name' -p 'ftp-password' -x "-t" ftp://ftp.your-server.com${BASE} > /tmp/ftp.out
LIST="$(grep ${DELETE} /tmp/ftp.out)"
echo -n "Starting removal for ${DELETE}..."
for dir in $LIST
do
 rdir="${BASE}/${dir}"
# echo "Processing ${dir}..."
 ncftp -L -u 'ftp-user-name' -p 'ftp-password' ftp.your-server.com <<EOF
 cd $rdir
 rm *
 rmdir $rdir
 quit
EOF
done

Run the script as follows to remove all backup for Dec-2007, enter:
$ ./script.sh 12-2007

Related: Generate backup ftp script using php based wizard