From June 2010

The other day I set out to finally start synching one of my backup folders on one of our Ubuntu Servers with Amazon S3. The reasons for this, are obvious. Amazon S3 is very cheap and reliable and is a good fit for keeping “smaller” chunks of files as a backup storage. So, apart from writing a script that runs trough crontab, which was easy to write, I’ve spent far more time to get the S3 script running. So, here are the steps to sync any folder with Amazon S3.

First off, I created a additional bucket on S3. Let’s call this backup “mybackup”.

Since, I did not wanted to install anything additionally to run the S3 scripts (there is a very popular S3Rsync for Ruby out there) I wanted to get it running with the “bash” shell itself. Why install another language, if you got everything already, right?

So, I went ahead and downloaded the S3-bash scripts. As the name implies, these are scripts that work in the bash shell and nothing else is needed for it. Unfortunately, the documentation lacks big time, so I had to run all over the net to find some. Since they are very sparse, here are the steps to get it running.

After you have unpacked the scripts you get three scripts called;

  • s3-get – for getting files from S3
  • s3-put – for putting files on S3
  • s3-delete – for deleting files on S3

Since we want to put files on S3, we are going to focus on the “s3-put” script. Here is a example how the commands for the s3-put script would look like:

s3-put -k {yourkey} -s awssecretfile -T /backup/ /s3-backup/

The explanation of the params is as follows:

  • -k
    The “-k” parameter is your Amazon S3 key
  • -s
    The “-s” parameter is a path to a file (which you have to write) which contains your Amazon S3 secret key. Please read further down, in order to avoid any errors with this.
  • -T
    The “-T” parameter should be the absolute path to your file that you want to out on Amazon S3
  • file bucket and path on S3
    Last but not least, you have to pass the path to your S3 bucket and the file name to the command string.

Now, that wasn’t so hard right? Well, there is one small thing that drove me crazy during my initial setup. That is that the file with my Amazon S3 secret key kept on throwing an error. Somehow the length was not matching and some other errors. After some digging around I figured that one has to write to the file again in order to get rid of the 41 bytes error message. To do that issue the following command:

cat awssecretfile | tr -d 'n' >> awssecretfile-new

Right, so I’m hoping this helps anyone out there. Have fun.

No no, I haven’t converted to the “other side”, but I had the need to extend my Windows Server 2008 VMWare image from 20GB to 40GB. Extending the virtual disk was a piece of cake (thanks to VMWare) but extending the disk on Windows Server 2008 was kinda “difficult” until I found the following description.

The reason why you can not simply extend the startup volume of your Windows server is that it won’t allow you to extend the startup volume in the GUI tool of the Administration under the disk management application. Fortunately, the engineers added this option in the command line tool “diskpart” since Windows Vista, Windows 7, Windows Server 2008 or Windows Server 2008 R2. These versions of Windows ship with a more enhanced version of diskpart.exe that supports partition extension for bootable disks.

In order to extend your startup volume you have to do the following;

Open a Command Prompt and type: diskpart

Type: list volume

Remember the volume number (#) of your volume!

Type: select volume (the number from the above step)

Type: extend

This is it and you don’t even have to reboot. How about that for a change :-)

Most of you probably remember the UI of the movie “Minority Report”. We all thought that this would be way cool to interact with our machines like that. Well, good news. The future of the UI is here. The makers of the movie did not only show us what could be done, but also allowed the guys to develop it.

In the below talk, John Underkoffler demoes the UI he and his team has been working on and compares it to the same revolution that once the Macintosh set off when it was introduced. I especially like the quote: “I think it is time that we ask the same of technology. Technology is capable off, expressing and being {…} with a certain generosity. And we need to demand that…”