Posts Tagged ‘ Howtos

Backup your Virtualmin to S3

Hi!

Long time since my last post! I want to say happy new year to everyone who visits my blog and I hope all your wishes come true in this year. I have been very busy with my start-up company the lasts months (I even had to work in my 3 days annual vacation ;) ) so that’s why I didn’t upload any new article. So today I will show you a little script that will upload your Virtualmin backups to S3. I have a customer that have backups larger than 5Gb and I can’t upload them directly to S3 since the limit per file in S3 is 5 Gbs so I used the split command to have 1Gb pieces of the backup and then upload all to S3. To use this script you have to configure your Virtualmin to backup to a local folder (In this case /bkps) and then have a daily script that can be placed in /etc/cron.daily for example with the following content:

#!/bin/bash

# Clean backup folder for old files
echo “Cleaning old backups…”
/usr/bin/find /bkps -type f -mtime +5 -print
/usr/bin/find /bkps -type f -mtime +5 -exec rm -f {} \;

for bkpfile in `ls -1 /bkps/*.bkp`
do
echo “Generating MD5SUM for the original backup file $bkpfile…”
md5sum $bkpfile >> $bkpfile-md5sums
echo “Splitting backup file $bkpfile…”
split -a 1 -d -b 1073741824 –verbose $bkpfile $bkpfile-part
for splitbkpfile in `ls -1 $bkpfile-part*`
do
echo “Generating MD5SUM for split backup file $splitbkpfile…”
md5sum $splitbkpfile >> $bkpfile-md5sums
done
rm $bkpfile
done

# Upload backups to S3
su -l -s /bin/bash -c “s3cmd –delete-removed -v sync /bkps s3://YOURBUCKET”

As you can see above, my backups are created with the extension .bkp also I have used the s3cmd to have access to S3. The installation of s3cmd is very easy and it haves packages for almost all the Linux distributions.

I hope you enjoy this script and later I will share with you some of my experiences with AWS cloud services for a large project I worked the lasts months including Load Balancing, Auto Scaler, etc. I have created some nice scripts (I think) to make my life with the AWS, so stay tuned! (I promise that you will not have to wait 2 months to have news from me ;) )

Thank you very much for your time.

Cheers!

How to take screen shots of your BlackBerry device

So you may wonder how is possible to take screen shots of your BlackBerry device without using your PC? Well in this post I will share with you what application I used to take the screen shots.

I used the CaptureIt application you can download it from http://m.thetechmogul.com/ it is really simple to install, also you can setup the Left Convenience Key to use it easily.

If you don’t know how to configure the Left Convenience Key, you have to go to Options, then Screen/Keyboard, then Left Convenience Key Opens and finally select CaptureIt from the list of applications.

Here are the captures of the process of how to install CaptureIt on my BlackBerry 9000:

blackberry-main-menu blackberry-browser blackberry-download blackberry-captureit-techmogul-industries-download blackberry-captureit-after-download blackberry-captureit-main-menu

How to Blog from your BlackBerry

As always I try to get the most of any device I have, so I wanted to blog with my BlackBerry 9000 A.K.A BlackBerry Bold when I am taking a rest of my desktop, or when I am in the bus or at my weekend house. To do this I Googled for an application to blog to my WordPress installation that I use to run this site, and I found this:
BlackBerry WordPress Application

So I downloaded and installed it, then I configured my Blog as you can see in the following screenshots, I wrote all this post from my BlackBerry and it is really easy to do it.

In a couple of minutes I will upload a howto to show you how you can take screen shots of your BlackBerry without a PC :)

Now the magic:

wordpress_blackberry_1 wordpress_blackberry_2 wordpress_blackberry_3 wordpress_blackberry_4 wordpress_blackberry_5 wordpress_blackberry_6 wordpress_blackberry_7 wordpress_blackberry_8 wordpress_blackberry_9