webOS Nation Forums >  webOS Discussion >  webOS Discussion Lounge > Bleeding edge : Manually transfer backups
Bleeding edge : Manually transfer backups
  Reply
Like Tree8Likes
  • 8 Post By GMMan

 
Thread Tools Display Modes
Old 11/25/2012, 03:07 AM   #1 (permalink)
Member
 
GMMan's Avatar
 
Posts: 2,136
I'm pretty sure most of you are aware that there are some problems with the Palm backup servers right now. It comes as a great inconvenience for those who are migrating devices or Doctoring them. I decided to dig into the backup system once again, and this time see if I can extract the data from the source. This guide will show you how to transfer the most basic and critical part of the backups: the applications database.

You will need Novacom and developer mode enabled on both the device you're transferring from (device A) and to (device B).

1. Open up a shell session on device A. Use Novaterm for this purpose. For Windows, look at
Code:
C:\Program Files\Palm, Inc\terminal\novaterm.bat
For Linux and Mac OS X, type this into your Terminal:
Code:
novaterm
2. Make a directory to store the backup:
Code:
mkdir /media/internal/backupTmp
3. Run pre-backup:
Code:
luna-send -n 1 -f -a com.palm.service.backup palm://com.palm.db/internal/preBackup '{"tempDir":"/media/internal/backupTmp", "maxTempBytes":"99999999"}'
You should see a response like this:
Code:
{                                                                                                                                                                                               
    "description": "incremental=381, , com.palm.account:1=2, com.palm.app.email.prefs:1=1, com.palm.app.messagingprefs:1=1, com.palm.browserhistory:1=2, com.palm.browserpreferences:1=4, com.pa
lm.calendar:1=1, com.palm.calendarprefs:1=1, com.palm.callcapabilities.telephony:1=1, com.palm.clock.prefs:1=1, com.palm.location.LocationServicesPrefs:1=1",                                   
    "files": [                                                                                                                                                                                  
        "backup-1353831235696178.json"                                                                                                                                                          
    ],                                                                                                                                                                                          
    "full": true,                                                                                                                                                                               
    "incrementalKey": {                                                                                                                                                                         
        "deletedRev": 6400,                                                                                                                                                                     
        "rev": 6401                                                                                                                                                                             
    },                                                                                                                                                                                          
    "returnValue": true,                                                                                                                                                                        
    "version": 8,                                                                                                                                                                               
    "warnings": 0                                                                                                                                                                               
}
Note under "files" the file name. Also note the version.
4. Run post-backup
Code:
luna-send -n 1 -f -a com.palm.service.backup palm://com.palm.db/internal/postBackup {}
5. Put the device in USB Drive mode, and pull out the file in the backupTmp directory.
6. Set up device B. If you get stuck on the restore section, use the activation bypass tool (see link in resource list, found in my sig). At this point your webOS Account should be set up, but you will not have any of your old data.
7. Enter USB Drive mode on device B, and create the backupTmp directory. Put the file you extracted from device A in there.
8. Open a shell session on device B.
9. Run pre-restore:
Code:
luna-send -n 1 -f -a com.palm.service.backup palm://com.palm.db/internal/preRestore '{"version":8}'
Replace the version number with the one from the pre-backup response. You should get a response like this:
Code:
{                                                                                                                                                                                               
    "proceed": true,                                                                                                                                                                            
    "returnValue": true                                                                                                                                                                         
}
Make sure proceed is true.
10. Run post-restore:
Code:
luna-send -n 1 -f -a com.palm.service.backup palm://com.palm.db/internal/postRestore '{"files": ["backup-name.json"], "tempDir":"/media/internal/backupTmp", "version":8}'
Replace "backup-name.json" with the file name noted from step 3, and also replace the version number as noted in step 3. After a moment the command should return true.
11. Type this into the shell for device B:
Code:
reboot
12. After the reboot, enter your credentials for your Synergy accounts. Verify that your data has been mostly restored.

Caveat: I noticed Gmail doesn't seem to restore properly in the Email app. Remove and re-add the account and it will work.

The above has been tested using my TouchPad and webOS Emulator 3.0.5.

More instructions on migrating the rest coming soon.
__________________
Contact: @GMMan_BZFlag (me on Twitter)
webOS Releases: Change your App Catalog country: TouchPad/PC | TouchPad/webOS Resources | Search suggestion patch for browser | Cycling Email Notifications | Don't Doctor! Make a good support request. | How to post logs | webOS Charge Monitor
GMMan is offline   Reply With Quote
Liked by sethron, Rnp, kostka and 5 others like this.
Old 11/25/2012, 06:39 AM   #2 (permalink)
Member
 
Posts: 77
I just tested it on an 2.2.4 emulator and took a look at the resulting json file. I think there is missing something as not all data seems to be there.

E.g. I could not find contact photos which normally are backed up and restored, too. There must be more to do for a full backup. I am still searching but could not find it, yet.
SebastianHa is offline   Reply With Quote
Old 11/25/2012, 06:43 AM   #3 (permalink)
Member
 
Posts: 77
see here for what should be included in a full backup: Palm Support : Using Backup
SebastianHa is offline   Reply With Quote
Old 11/25/2012, 11:19 AM   #4 (permalink)
Member
 
GMMan's Avatar
 
Posts: 2,136
Quote:
Originally Posted by SebastianHa View Post
I just tested it on an 2.2.4 emulator and took a look at the resulting json file. I think there is missing something as not all data seems to be there.

E.g. I could not find contact photos which normally are backed up and restored, too. There must be more to do for a full backup. I am still searching but could not find it, yet.
Contact photos don't actually need to be run through the backup system. Just copy and paste it to the new device. It's the .contactphotos folder in the USB Drive partition.

As mentioned, this guide is only for the app database. I'm researching on how the rest works.

App restore is done by the First Run app, and is not in the realm of the backup service.
__________________
Contact: @GMMan_BZFlag (me on Twitter)
webOS Releases: Change your App Catalog country: TouchPad/PC | TouchPad/webOS Resources | Search suggestion patch for browser | Cycling Email Notifications | Don't Doctor! Make a good support request. | How to post logs | webOS Charge Monitor
GMMan is offline   Reply With Quote
Old 11/25/2012, 11:31 AM   #5 (permalink)
Member
 
Posts: 77
I know but it would be very nice to understand the full backup procedure and being able to set up your own backup-server.

btw: thanks for your great work, I really appreciate it!
SebastianHa is offline   Reply With Quote
Old 11/25/2012, 12:32 PM   #6 (permalink)
Member
 
Posts: 125
GMMan,

What are your thoughts about using backup data from, say a touchpad, to restore a pre?

Hans
hans109h is offline   Reply With Quote
Old 11/25/2012, 12:36 PM   #7 (permalink)
Member
 
GMMan's Avatar
 
Posts: 2,136
Quote:
Originally Posted by hans109h View Post
GMMan,

What are your thoughts about using backup data from, say a touchpad, to restore a pre?

Hans
Could work, if the database kinds are still the same. I'm not sure how exactly the DB service imports the data, but considering you can do it from phone to table and there is no serverside processing, it seems possible. Try it on an emulator first.
__________________
Contact: @GMMan_BZFlag (me on Twitter)
webOS Releases: Change your App Catalog country: TouchPad/PC | TouchPad/webOS Resources | Search suggestion patch for browser | Cycling Email Notifications | Don't Doctor! Make a good support request. | How to post logs | webOS Charge Monitor
GMMan is offline   Reply With Quote
Thanked By: hans109h
Old 11/25/2012, 02:09 PM   #8 (permalink)
Member
 
Posts: 125
If you're cutting and pasting GMMan's commands, not that in step 10 you'll need to capitalize the b in the word Backup to point to the correct directory.

Hans
hans109h is offline   Reply With Quote
Old 11/25/2012, 02:27 PM   #9 (permalink)
Member
 
Posts: 125
Quote:
Originally Posted by GMMan View Post
Could work, if the database kinds are still the same. I'm not sure how exactly the DB service imports the data, but considering you can do it from phone to table and there is no serverside processing, it seems possible. Try it on an emulator first.

You, my friend, are a genius! Tested in emulator, reported back with a fatal error on reboot, but then restarted the emulator and the backup had taken. Did it again on my FrankenPre2 and I have my touchpad data on my phone now!

Do you take donations?

Hans

hans109h is offline   Reply With Quote
Old 11/25/2012, 04:29 PM   #10 (permalink)
pivotCE Developer
 
Posts: 2,103
so will these commands also work on-device-only with wterm (as root) or xecutah /xTerm?
__________________
Patch Enhancing vCard Export -|- Your own cloud with Zarafa (EAS sync) -|-
Tasks-app of 2.x on 3.x incl.EAS sync -|- SYM key in Enyo on phones -|- My hidden webOS Tips and Tricks - like it ?
gizmo21 is offline   Reply With Quote
Old 11/25/2012, 05:26 PM   #11 (permalink)
Member
 
GMMan's Avatar
 
Posts: 2,136
Quote:
Originally Posted by gizmo21 View Post
so will these commands also work on-device-only with wterm (as root) or xecutah /xTerm?
Definitely. You'll have to transfer files with a different way, though.
__________________
Contact: @GMMan_BZFlag (me on Twitter)
webOS Releases: Change your App Catalog country: TouchPad/PC | TouchPad/webOS Resources | Search suggestion patch for browser | Cycling Email Notifications | Don't Doctor! Make a good support request. | How to post logs | webOS Charge Monitor
GMMan is offline   Reply With Quote
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0