Putting together a backup strategy for your production box
Backups are worth in GOLD when you need them.
I simply cannot stress on the fact that if you are running a production web application and you are not backing up your critical data – you are bound to shoot yourself in the foot – sooner or later.
Something similar happened to us when we faced a similar situation… though we were backing up everything we wanted, we were not testing the integrity of our backed up data. AND when the D-Day came, we weren’t able to restore our data – even when we had our backups ready.
Lucky for us, we were able to recover.
Hence, I have put together a simple, no fancy – backup strategy which ping you on email if it detects that your backup isn’t working.
- Use astrails-safe gem to create and schedule rotating backups on S3 and local file system (you can add sftp uploads as well)
- Post backup, perform an integrity check on your tarballs and email a list of any corrupt files to yourself (using actionmailer gem).
- TODO – Re create the tarballs which fail the integrity check and upload them back to S3/local.
I’m planning to release this strategy with code into public domain… probably on a free weekend.
Please do share your comments on how you backup your critical data.
What happens when you reboot your EC2 instance?
We had to answer this question yesterday when our EC2 instance stopped responding and was constantly showing 100% CPU load. SSH wasn’t working and neither was apache responding. The CPU was hung at 100% load for a full day.
Hence, we decided that a reboot was the only solution.
I had a notion (and had read it as well) that a reboot wipes your disk clean and you start from a brand new AMI.
I was wrong. And I’m happy that I was wrong
We found, rebooting an EC2 instance does not affects your disk state. Your data is preserved.
But, if you terminate the instance and fire it up again, you’ll start form scratch.
Post reboot, we have recovered all our data (it was intact).
I’m in love.. and engaged to be engaged!
Life is too short to be spent alone…
As of today, I’ve committed to spend the rest of my life with my lovely better half – Kanika.
I am in love …and its beautiful.

It all started when I first boarded the Route 12 bus which provides pickup and drop facility to IBM’ers residing in and around North Delhi.
After taking an internal transfer to IBM Gurgaon on 17th November 2008, I had already missed the bus back to home on the first evening – and I was in no mood to miss it again on 18th November. And as a tradition with all the new people who start using Route 12, I was supposed to enact a movie in the game of “Dumb Charades” – ‘Aabru’.
Having never played dumb charades, I was obviously nervous and lost – but I took the challenge sportingly. It was then when I asked Kanika if I could use her “dupatta” as a prop. Though others objected, she readily agreed. And after enacting the movie, we sat together, chatting – for the rest of the journey – second seat from the starting, left side row (2×2 seats per row) with me occupying the window seat.
Little I knew that it was the beginning of something.
As time went by, We became platonic friends, occasionally sitting together in the 2 hours long journey from office-home/back discussing life, relationships.. or just catching up with each other on Google Talk during late night chats, etc. This obviously brought up the subject of marriage quite a few times – that how parents keep on looking out, arranged marriages – and love marriages.
I also had a chance to meet her lovely Mom when we took AdoMado’s proposal to BSNL. Her efforts were instrumental in getting us a meeting with the BSNL DGM.
The “bandi dhundho abhiyaan” at my place was pretty hot already. I was meeting/talking to a girl almost every two weeks… and wasn’t able to match my wavelength with any. People I met… were good, but not what I was looking for.
At the same time, my bonding with Kanika was growing stronger… She was beautiful, smart, intelligent, “sane”
and I knew that her family was obviously looking out.
That is when, on the morning of 17th September 2009, at almost 11:30 am in the morning – I proposed to her. I was really scared that day… almost had butterflies in my stomach. And it was completely unexpected for her too. She however, very surprisingly, took it in a very positive way… later I came to know that of the “many” proposals that came her way during her IBM tenure, mine was the only one for which she felt positive vibes… and spoke to her mom about it. And then to her dad. Awsm!
Things were still very platonic at that time, with absolutely no inclination towards love. We both did what we felt was right at that time. She took the discussion up with her parents. Her’s is a Punjabi family – Arora’s – and mine is Punjabi Jains. And if this marriage was to happen, it would be an inter caste marriage. We had to get a lot of permissions on our side if we wanted to take this through. Fun in life had just started
Expectations started building up fast. There was a time (I guess during mid October) when Kanika expressed that her family wishes her to settle within their caste. They were never opposed to an inter caste relation but their first preference was looking for a suitable match for her in their own caste. When Kanika told me that, that is what her parents think, I was a bit shattered. I knew that by this time, both (her’s and mine) goals were same, we both had developed a strong bonding. We were falling in love. So after hearing this news, I somehow held onto my sanity. Actually just knowing that Kanika thought exactly similar to what I did, kept me going. From speaking on phone a few times in a week… we went on to speak almost daily. We even started expecting each other to sit together in the bus – and used to feel bad when we couldn’t. And the best part – we used to discuss each and every thing, how we felt during the day, how are things going at either’s home, how many red circles have been marked on Sunday’s matrimonial newspaper, how many girls have accepted my online profile requests – almost everything.
Constant communication was the key to our bond. Kanika went great lengths to keep it alive. Mmuah!
Before we knew, we were in love.
Saying “Luv you“, wasn’t something awkward anymore.
It all changed with a consent from her Dad on 26th Dec night, 2009. Things started looking brighter.
The same night, I disclosed the news to my parents. They were obviously surprised – that I had kept this information from them from so many days. Sameer was already jumping with joy – he had already suggested my Mom that Kanika (whom he had met while dropping us to office one day) would be a good choice for Mayank – “why don’t you speak to Kanika’s parents about it”.
The surprise factor at my home was quite bigger than expected. Mom and Dad took a few days to digest what I had just told them. We even had some heated discussions.
I hope I’d be able to reverse the effect of those heated discussions…
Mom, Dad – I’m sorry if I said something which I shouldn’t have said.
I love you both.
On 1st January, 2010 – Kanika and her Brother Saurabh – met our family at Pizza Hut (Wazir Pur). We all had a nice time and enjoyed the pizzas.
I categorically remember, people asking us the next working day at IBM that how was our New Year – and we both were so wishing that we could tell them that how wonderful was, the first day of the year.
We did not looked back since. On 17th January 2010, I got my family’s acceptance. However, the “official” call to her Dad went out on 24th Jan 2010. My parents met her parents on 26th January 2010.
And all this time, we were mum in the office. We kept our interaction with each other as simplistic as possible. Besides regular discussions about life during bus travel (which was 2 hours each side) – we used to go for a cup of tea (2 for me, 1 for her) in the morning. The day used to conclude with us talking on the phone again during the night. I guess, at times we chatted for nearly 3 hours on the phone. That’s about 2+2+0.5+2 hours of talking daily. WOW!
Never before I knew that I could talk that much. I was changing… for good.
And then – the magical day of 14th Feb 2010 came…
While we went out on our first official Date, our parents met and decided to formalize the bond the very next Sunday – ie, today.
BTW, for everyone who was curious that on 14th Feb, from whom did I received those Roses, I guess I no longer have to conceal the source

Flowers from Kanika

Something from me
Today – on 21st Feb 2010, both the families met at Kanika’s place and performed the Roka ceremony.
Something which we started in September 2009, I hope we’ll be able to conclude – in Sept 2010
Today, I am officially committed – engaged to be engaged.
And I’m loving it

Roka ceremony from Kanika’s end – Saurabh performing the tilak.

Kanika’s Mom giving sweets to me…

My Mom performing the Roka ceremony from our end.

Everyone… missing is Sameer (he’s clicking the pic)

Saurabh.. loving his stint with the Camera.
I just cannot finish thanking both of the families that they tried to look beyond the boundaries of castes. Love transcends any such bias.
Kanika and myself couldn’t have embarked upon such a beautiful start without the support of our families.
Lots of love and thanks to Kanu’s Parents, Saurabh, Sameer – and Mom and Dad.
More photos on Facebook and Orkut.
And interesting thread of discussion on FB.
Learning from the best!
Just bought “Programming Ruby 1.9” from Flipkart.
![]() |
| From For Blog |
When I joined IBM ISS UI team and my tech lead suggested that we should start doing things in Rails- and I was prompt enough to pop up a suggestion – “that why don’t we use Python based web app frameworks Django or Turbo Gears (as I had some python experience)”.
All he replied was – “when we are looking for the best framework, why not use the one everyone’s trying to become”.
And hence, the awesome journey to Rails began.
Understanding Ruby better will make it so much more fun.
PS: No disrespect meant to the awesome work being put in by the Python community. Python rocks! So does Ruby!
Why so afraid?
Why are we so afraid of doing things we love doing? Specially those which make you feel happy.
Be it work, personal life, friends, or just anything.
3 years ago when I was at the brink of taking an important decision (personal and professional) – I read this article by Paul Grahams who went at great length to explain about two categories of people – One – those who make a living by doing things they love to do – and Two – those who make time and money for things they love by doing things they don’t love so much.
Quoting yet again from Paul Grahams article – How to do what you love.
Finding work you love is very difficult. Most people fail. Even if you succeed, it’s rare to be free to work on what you want till your thirties or forties. But if you have the destination in sight you’ll be more likely to arrive at it. If you know you can love work, you’re in the home stretch, and if you know what work you love, you’re practically there.
Leaving HCL Tech and joining Red Hat in Pune was almost a direct consequence of reading that article. For the year that I worked with Red Hat, I had joined the elite group who actually liked what they did, to make a living. Whatever I did during the day, used to give me an immense sense of belonging and contribution.
Today, almost 3 years hence, I’m now part of the second category which Paul Grahams described in his article – desperately trying to be back in first category. Things are complicated now – even though I want to get back to the first category (and I can) – I still NEED to be part of the second category. I need this “piggybacking” right now.
With Fireflies from Owl City playing in the background and Planet Ubuntu open in front of me, I’m simply missing my days at Red Hat – the time when I was actually happy.
Missing the feeling of doing things I love doing.
“I like to make myself believe, that planet earth turns slowwwly… Its hard to say that I rather stay awake when I’m asleep…”
“Leave my door open just a crack… Cause I feel like such an insomniac…”
(lyrics)
This day shall pass too. Brighter days await ![]()
Hope shall never die.
Pull up your socks – The magic of tsocks…
So if you are in a same situation as mine, you probably…
- Are on an MNC’s intranet which is being simultaneously used by a ton of other souls
- Get pathetic internet speeds, at times – measurable sometimes in BYTES!
- Even “git pull” takes like ages to complete…
- Any connection to Twitter is severed before it even sees light of the day!
The solution to all these worries is simpler than you think.
We can create an SSH tunnel to a *much* faster server and push our internet traffic over it. If the server is local, this will work even better – as your SSH on local LAN connections would be definitely faster than that on real WWW.
Follow http://wiki.freaks-unidos.net/weblogs/azul/firefox-ssh-tunnel and create a tunnel on any port. Lets call it $PORT
Basically, you need to run…
ssh -fND localhost:$PORT username@some-fast-server.com
Install tsocks – its a Transparent SOCKS Proxying Library which uses the magic of LD_PRELOAD and patches the connect() call to appropriately use a pre-configured proxy (via /etc/tsocks.conf). Hence any call like…
git pull
becomes
tsocks git pull
Your /etc/tsocks.conf looks something like this (after removing all the comments)
#Define a local network for which tsocks won’t patch the connect() call
local = 192.168.0.0/255.255.0.0path {
reaches = 0.0.0.0/0.0.0.0
server = 127.0.0.1
server_type = 5
server_port = $PORT
}
server = 127.0.0.1
server_type = 5
server_port = $PORT
Replace the $PORT by the port you selected when creating the SSH tunnel. Server remains 127.0.0.1 as your tunnel exists on your own machine.
To configure your Firefox to use this new tunnel, goto Edit > Preferences > Advanced > Network Tab > Settings and make it look like

Add URL’s and IP ranges to “No Proxy for” field to exempt them from using the SSH tunnel.
That’s it. Click OK and you are ready to rock!
Programmer Happiness – onroad to Rails3
Link: www.vimeo.com
Rails 3 Update by Yehuda Katz from Wind City Rails 2009
You just can’t ignore his style of explaining things!
Calendar
Recent Comments
- makuchaku: Next objective... move over to an EBS backed inst...
- Vivek Khurana: It is clearly mentioned in the EC2 docs that rebo...
- Shlomo Swidler: @Vivek Khurana, Reserved Instances do not pr...
- Gaurav: had some similar experiences ..had wiped my offic...
- Mayank Jain: Heyy Varun.. thanks for such nice wishes :) Plea...
- varun : hello bhaiya congratulations .. wow . nyc couple...
- Shubha: Such a beautiful story of a beautiful couple :) C...
- Mayank Jain: Thank you so much :)...
- Mayank Jain: Thanks Manuj for such lovely wishes :))...
- Manuj: a long sweet story. congrats dude really very hap...
Categories
- A brand new start (1)
- A strong urge to blog… (119)
- AdoMado (2)
- Advertising (2)
- android (2)
- API (2)
- ApnaBill (49)
- Beta (1)
- Blog (156)
- Broadcast (2)
- Browsers (3)
- Celunite (2)
- Cloud Computing (2)
- DBus (3)
- Dell XPS M1210 – my laptop (3)
- Domains and Hosting (1)
- Evolution (1)
- Family (7)
- Fedora Core (30)
- Fedora-i18n (17)
- Four Fractions (3)
- Friends (7)
- Friends @ IBM (1)
- g1 (1)
- Gadgets (1)
- GNU/Linux (46)
- GTK+ (1)
- Hacks (1)
- How-To (10)
- IDE (1)
- iPhone 3G (1)
- It calls for a blog… (49)
- Java (1)
- Just for archive (5)
- Kanika (1)
- Life (61)
- Life @ IBM (5)
- Life @ RedHat (6)
- Life in Delhi (6)
- Life in Pune (16)
- Linux (3)
- Maemo (8)
- makuchaku in USofA (11)
- Mechanize (2)
- Mobile (3)
- Music (3)
- My last night in Delhi-05Feb06 (3)
- N800 (7)
- Open Source (3)
- OpenSocial (2)
- Palm Pre (1)
- Politics (1)
- Potato Curry (6)
- Proto.in (3)
- Python (13)
- Rails (28)
- RAKA (1)
- Red Hat (17)
- Rent-A-Coder (2)
- Review (1)
- Reviews (1)
- Roomies (4)
- Ruby (18)
- Snoopy'n Piddi (4)
- Startups (42)
- Sticker (14)
- Symbian (1)
- Technology (28)
- Tennis (3)
- Travel (1)
- Ubuntu (5)
- Web 2.0 (21)








