Tag Archives: backup

Recovering Android KeyStore password

Sometime back, I helped a friend of mine to launch an app in the Android market. As most of the Android developers know, one of the requirements to upload your APK file into the android market is that you have to sign it using a KeyStore.

I created a new KeyStore for him and I signed the app and he uploaded it to Android market. All this happened a couple of years back and now when he wanted to update the app again, he had to sign the apk file again with the same KeyStore.

I had remembered to backup the keystore file, but somehow couldn’t remember the exact password I used while creating the KeyStore.

After a quick search, I realized that I am not the only one who has done that before and also realized that there is no other way to upload the app again, without recovering the password 🙁

I started my search to find ways to recover the password and luckily found a tool, which took a smart list of words and then tried to guess the password by brute force. I gave it a couple of probable words that I would have used for the password and luckily I was able to recover the password with-in a couple of hours. 🙂

Some major take aways for me from this entire episode.

  • Always, always and always make sure you have more than one copy of backup
  • Don’t ever forget the password for your KeyStore. If you do then you might have to abandon your current app in the market.
  • As @pareshmayani pointed out below, make sure you store the keystore file as well in your app’s repo. God be merciful on you, if you don’t version your code
  • Sometimes keeping a simple password helps 😉

Posted in Android/Java | Tagged , , , , | 7 Comments

Make sure you enable binary logs in MySQL

Today, I learned a very valuable lesson. Make sure you always enable binary logs in MySQL. I would have lost atleast 3 months of effort, if it was not enabled. Luckily it was enabled and I was able to do a point in time restore after someone did a wrong click.

If you maintain any kind of MySQL server (even if it is just a stage machine) make sure you enable binary logs in it. It is very easy to do and when something bad happens, you will be happy that you enabled it.

How to enable it

To enable binary logs all you have to do is to enable the following two settings in your my.cnf config file.

log_bin = /var/log/mysql/mysql-bin.log
expire_logs_days = 100

The first setting specifies the location where the logs should be kept and the second setting specifies the number of days to keep the logs. The default value is 10, but I changed it to 100.

How to restore from binary logs

You can do a point in time restore by using the mysqlbinlog tool, which comes with MySQL. Refer to this excellent tutorial to find out how to use mysqlbinlog tool.

Posted in Database Programming | Tagged , , | 1 Comment

DocSyncer is dead, can you trust your data with beta services

DocSyncer, the service that allowed users to sync their documents with Google Docs have shut down their doors since they couldn’t find a viable business model.

The way in which they have shut down has shocked me more than the fact that they have shut down the service. 🙁

Don’t get me wrong. I am not here to criticize or accuse them for shutting down. After all they were still in beta, (which means, use at your own risk). But I was rather annoyed that they didn’t even bother to send an email to the users, so that they can be prepared. It seems that they have posted a message in their website, but the users will visit the website only when they have to recover some documents which were already synced. The majority of the work was done by the desktop client and it is still running in my system tray, without giving any clue that the service was already shutdown.

I was one of the early adopters of the service and was so pleased with the service that I even wrote some tutorials about it. I have some critical documents which I update on daily basics. I wanted a simple solution to backup these documents and retrieve them based on date. DocSyncer was the perfect solution for me. I installed and pointed it to the directory in which I kept these documents and the client automatically backed up the documents to my Google Docs account.

A couple of day’s back I wanted to retrieve the document and tried to access the DocSyncer website but found that it was down. After a quick search in Google, I found that DocSyncer was dead. Last time I received an email from them was on April 22nd, when they announced pro account. This is not the first time I was affected because a service which I was using shutdown its doors, but I would have really appreciated if they could have sent a simple email saying that the service is going to be shut down.

Anyways, thank you Cliff Shaw and DocSyncer team for an excellent service which I was using for the past couple of months and my best wishes for your next startup.

If anyone from DocSyncer is reading this, then can you please let me know whether it is possible to opensource DocSyncer, at least the client alone? 😉

Meanwhile my search for an online backup system continues and I am planning to have a look at Windows Mesh and Dropbox. If anyone knows a better solution, then do let me know.

Posted in Random/Personal | Tagged , , , | 3 Comments

DocSyncer adds support for Google Apps account

Recently, when I showed you how to automatically backup documents to Google Docs using DocSyncer, I mentioned that it is not possible to backup the documents to your Google Apps account. But today DocSyncer have released an update and now it is possible to backup the documents to your Google Apps account.

You have to go to the Account settings tab and then click disconnect and then connect again. You will be taken to a page where you can select either Google Apps account or standard Gmail account.

DocSyncer

This is very useful to me, since I have started to use my Google Apps account instead of the standard Gmail account. Good job DocSyncer!

Posted in Google/Yahoo | Tagged , , , | 2 Comments

Automatically backing up documents in Google Docs

I was looking for a way to automatically backup my documents in Google Docs from my desktop. After a bit of googling, I found a great service called DocSyncer which worked exactly the same way I wanted it to work. So I thought of sharing the steps which I followed to back up my documents from desktop to Google Docs.

First sign up for the service from its home page.

DocSyncer

Then allow DocSyncer access to your Google Docs, by clicking “Grant Access” in the next screen

DocSyncer

After this download and install the DocSyncer program from the next screen

DocSyncer

By default DocSyncer syncs all documents which are present in your desktop and in your Documents folder. I wanted only a few documents to be synced, so I created a new folder called InSync in my Documents folder and selected only that folder and unchecked all the other folders. If you want to sync all the documents which are present in your Documents folder then you don’t need to edit anything.

DocSyncer

That’s it and now all the documents present in the folder that you have selected will be automatically synced. You can download the current version or the previous version of the document from the web interface.

DocSyncer

You can also directly download the document from the Google Docs page.

You can also associate document files (.doc, .ppt, .xls etc) with DocSyncer so that they are automatically opened in Google Docs instead of opening them from the local desktop. This can be done by changing the file association from the Account Setting tab of the web interface.

DocSyncer

I am using DocSyncer for the past one week and these are my findings based on my experience in the past week.

Pros

  • All previous versions of the file are stored.
  • You can directly open the file in Google Docs from any computer which has access to internet. You don’t need to have Microsoft Office suite installed.
  • Very clean interface and nice desktop Integration.
  • Connection through SSL (but you need to enable it in the Account Settings tab)

Cons

  • Can easily cluster your Google Docs page if the file is changed very frequently.
  • In the current beta version you cannot select any folder apart from the desktop and Documents folder.
  • It can upload only to Google Docs and not to Google Apps Docs. Update (2008-Feb-13): DocSyncer has added support for Google Apps account.

Posted in Google/Yahoo | Tagged , , , | 2 Comments

Struck by a Lightning

Last Thursday night, there was a mild thunder storm in my place and my house was struck by a lightning.

Within a fraction of a second, the parapet wall on top of the third floor of my house disappeared, my computer busted and both my dad’s heart and mine skipped a beat. It struck with such a force that it shook the whole building (three floors) and I could feel the vibration in my room in ground floor. I could see a huge flash of light through my glass window. It is one of those rare situations where you feel powerless in front of the mighty forces of nature. It took around 2-3 minutes for both me and my dad to figure out what has actually happened.

I have given my computer for service and so far the service guys have found out that only the power supply is working fine and the motherboard was fried. I am just hoping that my hard disk is not damaged so that I will not loose my data. Let’s see. 😉 Because of this I have limited access to Internet and if you have sent me a mail in the past week, then please note that it might take sometime for me to reply to your mail.

This is not the first time my computer is crashing but this whole thing has thought me two lessons.

  • Backup Backup Backup!!!
  • You are nothing in this world and anything can be changed completely within a second!

Update: I just got a call from the service guys. It seems that my motherboard has been totally fried, but the hard disk seems to have been saved. Thank God, now I can have my data back. Even though I am going to repair it instead of thrashing, I guess it is better that I have decided to get a new one. So guys don’t forget to give me your recommendations.

Posted in Random/Personal | Tagged , | 6 Comments

My site is up again

Continuing with my digital disasters my site also went down 🙁 and you know what, I didn’t had a backup. Yes I still have to learn the lesson. 🙁

It also thought me another lesson, never buy hosting from a cheap re-seller. I brought the original hosting account from a re-seller in eBay and I was happy for about a month but after that the company just disappeared overnight. To add salt to the wound I didn’t had a backup for my blog as well.

After that I bought another account from a reliable (?) hosting company and again took the pain to import the whole blog from blogger, like how I did it a month ago. But this time the new import option available in WordPress 2.0 was of real help (more on that for another day)

I was struck up with another problem after I imported. I only had posts which I wrote before I shifted to WordPress. Thanks to Google cache and Bloglines I was able to retrieve the posts which I wrote after I moved to WordPress and then I retrieved the comments from the email that were send by WordPress. So I was able to bring back my blog to the original state before it went down.

Thanks every one for the bearing with me during the downtime and for the support shown and wish you all a happy 2006.

Self Note: So two more resolutions for the New Year
1) Don’t buy hosting account from a cheap re-seller
2) Do take BACKUP of all important stuff.

Posted in WordPress | Tagged , , | 3 Comments