[G1 Android Development] prscott1:
backup contacts, bookmarks, wifi, and others

For those of us who are frequent flashers and want to save time getting things restored (like your gscripts :D ), I have a script that backs up specific databases and files for some of my applications (e.g., gscript scripts, connectbot hosts and keys, contacts, browser bookmarks, streamfurious channels, etc) and then I have a script that I run to restore them after a wipe/flash.

Here are the two scripts (the content tells what is being backed up and restored):

echo "Backing up k9 files..."
echo ""
cp -R /data/data/com.fsck.k9beta/* /sdcard/backup/k9/
echo "Backing up andftp files..."
echo ""
cp -R /data/data/lysesoft.andftp/* /sdcard/backup/andftp/
echo "Backing up ebay files..."
echo ""
cp -R /data/data/com.bonfiremedia.android_ebay/* /sdcard/backup/ebay/
echo "Pulling gscript database..."
echo ""
cp -R /data/data/nl.rogro.GScript/databases/gscript.sqlite /sdcard/backup/gscript/gscript.sqlite
echo "Pulling streamfurious database..."
echo ""
cp -R /data/data/com.streamfurious.android.free/databases/streamfurious.db /sdcard/backup/radio/streamfurious.db
echo "Backing up connectbot databases..."
echo ""
cp -R /data/data/org.connectbot/databases/* /sdcard/backup/connectbot/
echo "Pulling webcam database..."
echo ""
cp -R /data/data/com.rcreations.WebCamViewerPaid/databases/datadb /sdcard/backup/webcam/datadb
echo "Pulling contacts database..."
echo ""
cp -R /data/data/com.android.providers.contacts/databases/contacts.db /sdcard/backup/contacts/contacts.db
echo "Exporting browser bookmarks..."
echo ""
sqlite3 /data/data/com.android.browser/databases/browser.db << EOF
.output /sdcard/backup/browser/bookmarks.txt
select * from bookmarks where bookmark = '1';
.quit
EOF
echo "Pulling market database..."
echo ""
cp -R /data/data/com.android.vending/databases/assets.db /sdcard/backup/market/assets.db
echo "Pulling wifi connections..."
echo ""
cp -R /data/misc/wifi/wpa_supplicant.conf /sdcard/backup/wifi/wpa_supplicant.conf
echo "Finished backup"

And to restore (note: you must create the /sdcard/backup/... tree first):

echo "Restoring k9 files..."
echo ""
cp -R /sdcard/backup/k9/* /data/data/com.fsck.k9beta/
echo "Restoring andftp files..."
echo ""
cp -R /sdcard/backup/andftp/* /data/data/lysesoft.andftp/
echo "Restoring ebay files..."
echo ""
cp -R /sdcard/backup/ebay/* /data/data/com.bonfiremedia.android_ebay/
echo "Restoring gscript database..."
echo ""
cp -R /sdcard/backup/gscript/gscript.sqlite /data/data/nl.rogro.GScript/databases/gscript.sqlite
echo "Restoring streamfurious files..."
echo ""
cp -R /sdcard/backup/radio/streamfurious.db /data/data/com.streamfurious.android.free/databases/streamfurious.db
echo "Restoring connectbot databases..."
echo ""
cp -R /sdcard/backup/connectbot/* /data/data/org.connectbot/databases/
echo "Restoring webcam database..."
echo ""
cp -R /sdcard/backup/webcam/datadb /data/data/com.rcreations.WebCamViewerPaid/databases/datadb
echo "Restoring contact database..."
echo ""
cp -R /sdcard/backup/contacts/contacts.db /data/data/com.android.providers.contacts/databases/contacts.db
echo "Importing browser bookmarks..."
echo ""
sqlite3 /data/data/com.android.browser/databases/browser.db << EOF
delete from bookmarks;
.import /sdcard/backup/browser/bookmarks.txt bookmarks
.quit
EOF
echo "Restoring market database..."
echo ""
cp -R /sdcard/backup/market/assets.db /data/data/com.android.vending/databases/assets.db
echo "Restoring wifi connections..."
echo ""
cp -R /sdcard/backup/wifi/wpa_supplicant.conf /data/misc/wifi/wpa_supplicant.conf
echo "Finished restore"
echo ""
echo "Will reboot now..."
sleep 2
reboot

Note: I keep building on this backup script and find it is more useful to me than the backup apps I have tried. I thought some of you might find it useful too.