Black God

How to backup Blackberry on Ubuntu (linux)

Blackberry 7130c

I am having a Blackberry 7130c which I want to take backup especially for address book. As usual I wanted to do it in Linux. The result is this How-To to connect to Blackberry in linux,  taking backup and restoring.

What you need to do this?

1. Your Blackberry phone. In my case it is 7130c model.

2. Any miniUSB cable – i.e. miniUSB at one end and other end is A-type (common one). In my case, I used miniUSB cable came along with my Canon Digital camera.

3. A Linux desktop/laptop. In my case it is Ubuntu 10.04

4. No mindset against linux’s command line power :-)

Making Blackberry to communicate with Linux

1. Connect the miniUSB cable end with Blackberry and another end to Linux machine. Issue the following command and observe the output as shown below. The red bold number shows that vendor is RIM (Blackberry manufacturer) and green bold shows your blackberry model. In my case it is “0001”.

swamytk@swamytk-laptop:~$ lsusb

Bus 007 Device 002: ID 044e:3017 Alps Electric Co., Ltd
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 022: ID 0fca:0001 Research In Motion, Ltd. Blackberry Handheld
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 147e:1000 Upek
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 05ca:183f Ricoh Co., Ltd
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

If you are not able to see anything like this, check your USB cable and try alternative one.

2. Install the necessary packages. To do this task we need OpenSync tool which can synchronize address book, calendar kind of PIM data between computers, Mobiles, PDA, etc.
OpenSync’s main and most practical goal is to create a solution to synchronize PIM (Personal Information Management – addressbook contacts, calendar events and tasks, personal notes, etc) data between mobile devices like mobile phones, PDAs (Personal Digital Assistant), desktop computer PIM tools and -services.

swamytk@swamytk-laptop:~$ sudo apt-get install barry-util barrybackup-gui libopensync0 opensync-plugin-barry


3. Now run the “btool -t” command to list down the databases available in Blackberry. It it is success, we are almost done.


swamytk@swamytk-laptop:~$ btool -t
Blackberry devices found:
Device ID: 0x957cd18. PIN: 23e5aa2d, Description: RIM 7100 Series Colour GPRS Handheld
Using device (PIN): 23e5aa2d
Database database:
Database: 0x0 ‘Content Store’ (records: 19)
Database: 0x1 ‘Service Book’ (records: 0)
Database: 0x2 ‘Trusted Key Store’ (records: 35)
Database: 0x3 ‘AutoText’ (records: 108)
Database: 0x4 ‘Default Service Selector’ (records: 2)
Database: 0x5 ‘Handheld Key Store’ (records: 35)
Database: 0x6 ‘Handheld Configuration’ (records: 0)
Database: 0x7 ‘Handheld Agent’ (records: 367)
Database: 0x8 ‘KeyStoreManager’ (records: 1)
Database: 0x9 ‘Firewall Options’ (records: 1)
Database: 0xa ‘Policy’ (records: 0)
. . . . . . . . . . .
Database: 0x1d ‘Message List Options’ (records: 1)
. . . . . . . . . . .
Database: 0x40 ‘Quick Contacts’ (records: 1)
Database: 0x41 ‘PasswordKeeper’ (records: 0)
Database: 0x42 ‘PasswordKeeper Options’ (records: 1)

In case the above command fails with the message shown below, follow the checks listed below.

Usb::Error caught: (-1, error sending control message: Operation not permitted): Probe: GetConfiguration failed

Check 1: Ensure that device is identified by udev.

swamytk@swamytk-laptop:~$ sudo grep ‘0fca.*0001‘ /etc/udev/rules.d/10-blackberry.rules
BUS==”usb”, SUBSYSTEM==”usb_device”, ACTION==”add”, SYSFS{idVendor}==”0fca”, SYSFS{idProduct}==”0001″, SYMLINK+=”bb-%k”, GROUP=”plugdev”, MODE=”0660″, RUN=”/usr/sbin/bcharge -p %p”
BUS==”usb”, ENV{DEVTYPE}==”usb_device”, ACTION==”add”, SYSFS{idVendor}==”0fca”, SYSFS{idProduct}==”0001″, SYMLINK+=”bb-%k”, GROUP=”plugdev”, MODE=”0660″, RUN=”/usr/sbin/bcharge -p %p”

In the above command shown, replace green bold with your Vendor ID and Device ID as we have noted down with lsusb command. There should be one or two entries in /etc/udev/rules.d/10-blackberry.rules file.

Check 2: Ensure that you have permissions to access the device.

swamytk@swamytk-laptop:~$ sudo grep plugdev /etc/group
plugdev:x:46:swamytk,testuser

The above command is to ensure that your username is part of plugdev group. If not add your username to plugdev group by editing /etc/group.

Check 3: Restart the udev service as a safe side.

swamytk@swamytk-laptop:~$ sudo service udev restart

Check 4: Reboot the linux in worst case to make all changes effective.

Backup and Restore

Now the backup and restore is straight forward. Run the barrybackup tool from command line. You may not have shortcut in menu. The following screenshots show the sequences.

Running barrybackup for first time (click to enlarge)

When you run this tool first time, it will ask for a human readable nice name for your mobile. Enter some name and click ok.

Backup of Blackberry (click to enlarge)

Then you will two options, one is Backup and Restore. Do backup first to ensure that it is doing well. This will create a compressed file in ~/.barry/backup/<yourPIN> directory. Then try restoring. While restoring, it will ask for data file. Select the compressed file. It should restore.

It is stored as compressed file.

The latest version of this tool is available in https://launchpad.net/~doctormo/+archive/barry-snapshot which has more features.

Many thanks to following resources online which helped me to get it done:

1 comment for “How to backup Blackberry on Ubuntu (linux)

Leave a Reply

Your email address will not be published. Required fields are marked *