webOS Nation Forums >  webOS Developers >  webOS Development > [How To] Create a backup of your device when in recovery mode, including apps
[How To] Create a backup of your device when in recovery mode, including apps
  Reply
Like Tree1Likes
  • 1 Post By gizmo21

 
Thread Tools Display Modes
Old 04/14/2012, 12:28 PM   #1 (permalink)
Homebrew Developer
 
Posts: 695
You should have some experience with (deskop) Linux and webOS to follow this how-to.

If you just want to backup /media/internal and not any apps, follow this instead. I've written this how-to mainly to share my experience on how to mount cryptofs in recovery mode (and how to get the cryptofs key), so that you can backup your apps as well.

First, setup Meta-Doctor on your desktop Linux (or OS X, haven't tried it though) by cloning the meta-doctor git-repository. After that, you need to run the make command as described in step 2 of the wiki article.
Then boot into recovery mode.

Now run this command from the meta-doctor directory (of course adjust DEVICE and CARRIER):
Code:
make DEVICE=preplus CARRIER=wr memload mount
After it's finished, you should see the boot logo. The device won't boot, it's in something like a "special recovery mode".

Now connect to your device using novaterm.
In novaterm, run these commands:
Code:
mount -o remount,rw /
mount -o remount,rw /tmp/media/
export LD_LIBRARY_PATH=/tmp/root/usr/lib/
mount --bind /tmp/media/ /media/internal/
Download the attached file "cryptofs.zip" and extract it (alternative url: cryptofs - no extraction needed).
Then run on your computer (from where you downloaded/extracted the file):
Code:
novacom put file:///usr/bin/cryptofs < ./cryptofs
Back in novaterm:
Code:
chmod +x /usr/bin/cryptofs
/tmp/root/usr/bin/mountcfs
(You should see output saying "Enter password:", just ignore it. If you don't see it, it's likely that something went wrong.)

Now, open the meta-doctor Makefile in a plain text editor.
Replace
Code:
backup: mount
with
Code:
backup: #mount
If you don't want to include the encrypted .palm folder in the backup, also replace
Code:
( novacom -w run file://bin/tar -- -C /tmp/media/ --totals -cf - . ) | \
with
Code:
( novacom -w run file://bin/tar -- -C /tmp/media/ --exclude=.palm --totals -cf - . ) | \
Finally, run this in your meta-doctor directory (again, adjust DEVICE and CARRIER):
Code:
make DEVICE=preplus CARRIER=wr backup
Now, you should have a directory called "meta-doctor/clones/*subdir*/" with the backup files contained.
Your "USB partition" (/media/internal) and your apps folder is included in "nova-cust-image-castle.media.tar.gz". The decrypted /media/cryptofs folder (where your applications are in) is in the folder ".cryptofs" of the mentioned archive.

An easy way to turn off your device is to unplug the USB cable and pull out the battery (though this only works on phones).

I hope this helps some, if you have any questions, feel free to ask!
Attached Files
File Type: zip cryptofs.zip (223 Bytes, 9 views) Email Attachment
__________________
Apps: Explorer for Dropbox a Dropbox app for webOS that actually works (TP+phones), 3-panel-interface
File Explorer fast and simple file manager (root support on webOS 3)
QuickChat for Facebook real-time Facebook chat
Archive Manager extract and create archives (zip, rar, 7z, )
FTPit! full-featured FTP client for webOS
Twitter: @pcworldSoftware; e-mail (contact, support, buy apps via PayPal) if you like what I'm doing, feel free to (alternatively in USD)

Last edited by pcworld; 04/14/2012 at 12:42 PM.
pcworld is offline   Reply With Quote
Old 12/18/2012, 03:27 PM   #2 (permalink)
pivotCE Developer
 
Posts: 2,116
here just another method of backing up of all installed apps and restoring of selected ones:
(without recovery mode)

L\'Haut-Parleur Original Palm Pre auf WebOS 2.1 updaten

- download mybackup.zip
- copy unzipped hybrid/PDK file to USB partition
- Login via novaterm or on device wterm as root (Default exec command: login -f root)
- cd /
- /media/internal/mybackup starts the PDK app
- select BACKUP and wait from 10-40minutes depending on appcount/size
- all apps are stored/gzipped seperatly in /media/internal/mybackup

Restore:
- To restore make filesystem writeable:
- mount -o rw, remount /
- cd /
- /media/internal/mybackup
- whatever of the backupfiles is still in the mybackup folder will be restored when using button RESTORE instead of BACKUP

Backup/Restore tested on 1.4.5
Backup tested on 2.2.4
did not test on 3.x

Last edited by gizmo21; 02/07/2013 at 01:57 PM.
gizmo21 is offline   Reply With Quote
Liked by sshaka likes this.
Thanked by MrGan, sshaka
Old 12/18/2012, 03:42 PM   #3 (permalink)
Member
 
Remy X's Avatar
 
Posts: 1,282
@gizmo21,

You could have specified that your suggestion only works on a bootable device. The original one above refers to "Doctor"/recovery mode....
Remy X is offline   Reply With Quote
Old 12/18/2012, 08:53 PM   #4 (permalink)
Member
 
GMMan's Avatar
 
Posts: 2,136
A note about cryptofs in the OP: The key used is static to the device, so backing up the .palm folder is perfectly fine if the restore target will be to the original device.

(Or, bypass cryptofs entirely and use passfs instead.)
__________________
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: pcworld
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0