Log in

View Full Version : The best way to replicate settings,data and apps on a different device


sup
2014-06-26, 12:35
My device stopped working, so I bought a new one. I tried to restore my original setting via backupmenu, but that fails (http://talk.maemo.org/showthread.php?p=1430914).

What is the best way to go about restoring apps, data and settings? Backupmenu is able to restore OptFS, but when I try to restore RootFS, it fails.

So far I am going to do it like this:
1) Install rootsh and ssh server via the device so I can ssh into it.
2) Install csthumb (via gui, as recommended).
3) Install all applications via apt-get (how do I get a list of applications from the backup images, is that possible?)
4) Connect the phone via USB via backupmenu and copy files that are different in my backup and the phone.

Am I missing anything? I will need to check if there are any differences in RootFS on the phone and in the backup, but that should do it, right?

michaaa62
2014-06-26, 21:12
Is your old device broken beyond starting?

To 2) Before installing CSSU-thumb decide, which kernel you want to use. Either kernel-cssu or kernel-power.
To 3) There are informations about the installed packages and their status in /var/lib/dpkg/info and in /var /lib/dpkg/status, but those files are not easily readable, because of all the dpkg info/garbage, that is part of the package management

Personal note:
My approach with an older, but still working N900 was the following:
1. Install rootsh, backupmenu and kernel-power stuff into the new N900 and reboot once to the fresh kernel.
2. Verify the kernel version to be the same on both devices.
3. Create a backup of the settings, favorites, package list and contacts/communication with the built-in
Backup application on an external microSD card of the old device.
4. Create a rootfs-only backup with BackupMenu again on the external microSD card.
5. Transfer the microSD card to the new device and boot into backupmenu.
6. Restore the rootfs-only backup from the microSD card to the new device.
7. Reboot into backupmenu on both your N900.
8. Connect both devices to an PC running Linux, either installed or Live-CD will work.
9. Transfer the complete content of the internal card of the old device, /dev/sdX, to the new device, /dev/sdYdd if=/dev/sdX of=/dev/sdY bs=4096If you are unsure about the device names, attach only one device at a time and 'dd' the content to the PC first, later from the PC to the nwe N900.

sup
2014-06-27, 13:06
This works in python to parse /var/lib/dpkg/status for installed files (quick and dirty):

ff = open('a','r')
a = ff.readlines()
pac = []
for i,l in enumerate(a):
s = l.split(' ')
if s[0] == 'Status:':
if s[-1] == 'installed\n':
print s
pac.append(a[i-1].split(' ')[1].strip('\n'))
p = ' '.join(pac)
print p

(working on the rest in the meantime)

sup
2014-06-27, 16:30
After installing CSSU image, restoring both OptFS and RootFS worked.

pichlo
2014-06-27, 18:06
I wasn't so lucky :( (talk.maemo.org/showthread.php?t=90448)