Increase Your VMware Virtual Hard Disk Size ( vmdk file )

Posted on in Categories Backup, Hardware, Howto, Linux desktop, Linux Virtualization, Storage, Sys admin, Tips, Ubuntu Linux, vmware, windows vista last updated June 18, 2009

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.

How To Use Gmail Account To Relay Email From a Shell Prompt

Posted on in Categories Backup, Debian Linux, fedora linux, Howto, Linux, Linux desktop, RedHat/Fedora Linux, Tip of the day last updated April 22, 2009

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.

Linux Create Incremental Backups Using FlyBack GUI Time Machine Backup Software

Posted on in Categories Backup, Data recovery, Gnome, Howto, Linux, Linux desktop last updated January 21, 2008

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

Posted on in Categories Backup, Howto, Linux, RedHat/Fedora Linux, Shell scripting, Tips, Ubuntu Linux, UNIX last updated January 20, 2008

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