MobileBackup for Java-enabled cell phones
Alternative application: JContactBackup
MobileBackup works and does what it should but it's user interface really needs improvement, for which I've little time. I've just discovered another open-source mobile backup application, JContactBackup (www), which is newer than MobileBackup - you may want to check this.
It has a nicer user interface than MB, but it has also some shortcomings (as of 1/2010), the main one being that it supports only the English alphabet, while MB uses the text encoding UTF-8 and can thus represent most national characters on the world.
MobileBackup is a Java application for mobile phones that can back up or restore/import your contacts, calendar events and TODOs to/from a text file on the mobile phone. Check the Requirements section to learn whether it will work on your phone.
- The Java program usually sits on the phone's memory card.
- When the application runs, it creates a single file in a Backup directory, usually on the memory card, which contains all the contents of the Address Book (aka contacts list) in vCard format, and the Calendar and TODO lists (in vCalendar format). The filename includes the date of the backup.
- You can then copy the file back to the computer, e.g. by mounting the memory card over the USB cable or sending the file via Bluetooth or infraport.
- The application looks for the file named Backup.txt in the folder Backup under the selected file root (e.g. E: for memory card). It must contain entries in the vCard and/or vCalendar format supported by your phone and it may contain additional information about where exactly the data should be imported (such as SIM or Phone adress book), see the backup file description.
- Entries from the file are appended to the appropriate list (contacts, calendar, ...).
- The application has a built-in help so you should be able to use it even if you don't print this page :-)
It's also important to realise what the program is not supposed to do:
- It's not intended for synchronisation with any other data store.
Why to use MobileBackup?
- It's always a good idea to backup your important data :-)
- Usually a mobile phone ships with a desktop application that you can use to back it up but such an application may not be available for you operating system (e.g. Nokia doesn't support Linux :-( ).
- MobileBackup, as opposed to some desktop applications, uses the phone's own backup functions and can thus save or restore the complete calendar/contact records including some special fields that may not be common in other similar devices.
- The backup file is a simple text file with entries according to the vCard/vCalendar standard (as implemented by the particular phone). You can read it in a text editor, modify it, or create your own for importing contacts etc. from anywhere.
- MobileBackup can import/restore entries into a particular section of the phone's Address Book (for example SIM or phone's address book) or Calendar. See the backup file format for details.
- MobileBackup supports fully national characters such as Czech thanks its usage of UTF-8. Though common, some apps still have problem with that.
- Copy the application's .jar and .jad files to your phone, for example its memory card. I put mine in a top-level directory called Java.
- Select the application in the phone, on a Nokia by going to Apps | Memory Card | Java or (Nokia 6300) Gallerys | Memory Card | Java, and selecting MobileBackup. Don't open it yet!
- You now have to set security options so that the program can access the address book etc., write to the memory card, and restore entries into Calendar/Contacts:
- Press the Options button, and select Application Access | Data Access.
- Select Read User Data, and set this option to Ask Every Time.
- Select Add and Edit Data, and set this option to Ask Every Time.
- Use the Back button to return to the application list.
NOTE: I don't have a trusted key for signing the program - that's why the best you can manage is Ask every time. If the program was signed, you'd be able to set the options not to ask, or to ask only the first time (which would be much nicer).
Download MobileBackup's latest version from SourceForge.net.
Compare your phone's technical specification with the requirements listed below:
- The mobile phone must implement the optional File connection and PIM APIs (JSR 75).
- CLDC 1.1 (though 1.0 may also work).
- MIDP 2.0.
Performing a Backup
Instructions based on a Nokia mobile but it's similar for all.
- Select the application in the phone, by going to Apps | Memory Card | Java (or as appropriate for your phone), and selecting MobileBackup. Select the Open button to open the program.
- You'll see a few options: Backup phone, Set backup file root, Set debug, Restore backup and Help. If you're using a phone like the Nokia 6300, you can go straight to Backup phone. If not, see the Other Phones section below.
- You'll see a title of Backup Phone, and an instruction to press Start to backup the phone. Go ahead and press Start.
- If you forgot to set the data access permissions as instructed above, if will fail and you will be informed that access was rejected (and there may be some SecurityException).
- You'll now be prompted a number of times to confirm access for the following. You need to say Yes to each:
- Edit and add new data in Memory Card (normally only once, but 3 times if the Backup directory doesn't exist).
- This may fail with "Failed to open or write to backup file. ...". This may be caused either by the need to set a backup file root first see below) or by the application's inability to create the directory Backup under the selected backup file root (which the memory card or E: by default). In the second case, exit the application, create the directory (e.g. Memory Card/Backup), and try again.
- Read data in Contacts (twice on my phone).
- Read data in Calendar (5 times on my phone).
- Read data in To-do list (once on my phone).
- Edit and add new data in Memory Card (normally only once, but 3 times if the Backup directory doesn't exist).
- (v2.0) While performing the backup, you will see rather confusing empty screen with the text "Press Start to backup" (though there is nothing to press) and no progress indication. Don't be scared, the backup is going on, wait for a few minutes.
- You'll now see a summary of the backup. This shows:
- For each list exported, the type of list (Contacts, Calendar or TODO).
- For each list exported within those list types, the list name (e.g. Phone, Memo, Reminder), followed by the number of items in the list.
- The backup file can be found in a file named Backup-yyyymmdd.txt in the Backup directory on the memory card, where yyyymmdd is the current date in year/month/day format.
- You can now exit from the program, and copy the backup file to your computer (either the memory card via USB/Bluetooth/..., or move the memory card if you're a glutton for punishment).
Other Phones: Setting backup file root
By default, the application tries to read from/write to the file root "E:", which is, on Nokia mobiles, the memory card. If you want to select a different backup root or if you need to do so because E: isn't defined on your phone then:
- From the main menu, select Set backup file root.
- The application detects the available file roots (i.e. top-level directories) and let you select one of them. On Nokia you would see C: (the phone) and E: (the memory card).
Performing a Restore
This functions reads vcard (contact) and/or vcalendar (events, TODOs) records from the file (unless you changed the backup root) Memory Card/Backup/Backup.txt and appends them to your contacts and calendar. It doesn't delete or modify any existing data - therefore doing backup and restore will result in duplication of all entries. It's up to you to clear your calendar/contacts first. But I'd recommend you to backup the phone first using the vendor's application to be really sure that you will not loose any data.
- The Backup.txt can be created by renaming the file produced by backup or you can create it manually from VCARD and VCALENDAR entries created by any application supporting the standard, only the phone must support the same version. Thus it can be used to import new data.
- You will be asked to confirm import of every single record (phone security limitation).
- To put record into a specific list (such as SIM or Telephone for contacts) you may separate entries with a marker line like '# Contacts SIM', see the backup file format section or (the best) create a backup file on your phone and check it.
- Important: The list names may depend on the current phone's language, at least they're on Nokia 6300. Therefore make sure to switch your phone into the same language you had during backup.
- v2.0 issue: If a list name contains a character not in the English alphabet then Restore will ignore it and will append the entries to the default list for that entry type (usually phone's Address Book for contacts, Reminder for a calendar event and TODO for a calendar TODO.
- Workaround (at least for Nokia 6300): Switch phone's language to English prior to backup and restore. This will also change the list names.
Backup created on one mobile phone/application doesn't need to read 100% on another phone because different phones may have different fields or represent them differently or may also encode data (for example calendar entry repetition info) differently. I'd advice you to first create a complex entry on the source phone, back it up and compare the produced backup file with that you want import.
The Backup File Format
The file format of the backup file is as follows (see example below):
- Each list has a 3-line header, which includes the list type (Contacts, Calendar or TODO) and the list name (e.g. Phone, SIM, Meeting)
- For files used for Restore this header is optional.
- List names are phone and often also language specific (i.e. depend on the phone's current language) and there are usually multiple lists per a particular list type, one of them is always default (depends on the phone) and is used for example during restore if no list name is provided or if it cannot be handled (e.g. during v2.0's issue with national characters).
- Each Contacts entry is in vCard format (version 3.0 if available, otherwise the first reported by the phone)
- Each Calendar or TODO entry is in vCalendar 1.0 format
- Each entry has a blank line after it.
- The file uses DOS/Windows' end-of line markers. If you create/edit it under Linux etc., set your editor to store it with windows line separators.
Sample extract from the backup file:
# ======================================================================== # Contacts Phone # ======================================================================== BEGIN:VCARD VERSION:3.0 N:Adrian m FN: TEL;TYPE=PREF;TYPE=VOICE:0xxxxxxxxx END:VCARD BEGIN:VCARD VERSION:3.0 N:Ajug Late Entry FN: TEL;TYPE=PREF;TYPE=VOICE:0xxxxxxxxx END:VCARD BEGIN:VCARD VERSION:3.0 N:Plny;Pokus FN: ORG:Firma ADR:;Rozsir.adresa;Ulice1;Mesto1;Stat1;14300;Zeme1 BDAY:19800821T000000 TEL;TYPE=PREF;TYPE=VOICE:777628431 TEL;TYPE=CELL,VOICE:777628431 TEL;TYPE=WORK,VOICE:2251050170 EMAIL:firstname.lastname@example.org EMAIL:email@example.com URL:http://web.ja.cz END:VCARD ... # ======================================================================== # Contacts SMS # ======================================================================== BEGIN:VCARD VERSION:3.0 N:Bob X FN: TEL;TYPE=PREF;TYPE=VOICE:0xxxxxxxxx END:VCARD # ======================================================================== # Calendar Meeting # ======================================================================== BEGIN:VCALENDAR VERSION:1.0 BEGIN:VEVENT DTSTART:20070625T210000 DTEND:20070625T220000 DALARM:20070625T200000 CATEGORIES:MEETING SUMMARY;CHARSET=UTF-8:Some random meeting LOCATION;CHARSET=UTF-8:Bell room END:VEVENT END:VCALENDAR
MobileBackup v1.0 has been originally developed by John Dickson in 2007.
In 2009 it was extended by Jakub Holý to be also able to restore entries from a backup file because he needed to find a way to import complete data from his old cell phone to his new Nokia 6300.