Cannot migrate data to a new device



  • Re: Migrate data from device to device

    Hi all,

    I have a nexus 5 running ubuntu touch 16.04 with some hardware issues (cracked screen and broken headphone jack). I have another nexus 5 in better shape, on which I have successfully installed the same operating system. But I have not been able to migrate my contacts/text message history.

    I have tried two methods (detailed below), to no avail. In both cases the new phone, after a reboot does not find the history data. I can check with adb shell that the /home/phablet/.local/share/history-service/history.sqlite (this is where call and text history are stored, no?) has been migrated. But for some reason it is not being read by the new phone.

    Any advice would be greatly appreciated. Many thanks.

    == Method 1 ==:

    (on old phone)
    adb pull /home/phablet/ $HOME/Backup/

    (on new phone)
    adb push $HOME/Backup/phablet /home/

    == Method 2 ==:

    (on old phone)

    adb root recovery
    adb shell
    # tar -czpv -f /system-data.tgz /data/system-data/ >/system-data.out 2>/system-data.err 
    # tar -czpv -f /user-data.tgz /data/user-data/ --exclude='*data/user-data/phablet/.cache*' >/user-data.out 2>/user-data.err
    # exit
    adb pull /system-data.tgz  $HOME/Backup/
    adb pull /user-data.tgz  $HOME/Backup/
    

    (on new phone)

    adb root recovery
    adb push $HOME/Backup/system-data.tgz /
    adb push $HOME/Backup/user-data.tgz /
    adb shell
    # tar -xzv -f /system-data.tgz
    # tar -xzv -f /user-data.tgz
    # exit
    


  • Method 3 (if you only want to backup contact and MMS/SMS)

    With file manager go to .local\share\evolution and here copy adressbook folder to your document folder, then go to .local\share\ and copy history-service to your document folder.

    Then acces your device via usb with your PC and backup document folder.

    Then do the opposite with your new device.



  • Many thanks!

    I can confirm that option 3 successfully (and quickly!) transferred contacts and SMS history to the new phone. Seems trivial to also migrate music, photos, and files. I'm not too worried about apps or settings. So I am good!

    Not urgent, but I am confused as to why the other, heavy-handed, routes failed. Did they not transfer these folders? Was I sending them to the wrong path?



  • @jaytee said in Cannot migrate data to a new device:

    Not urgent, but I am confused as to why the other, heavy-handed, routes failed. Did they not transfer these folders? Was I sending them to the wrong path?

    Don't know, never used this way, i'm on windows (don't smack me lol).



  • If anyone else has this issue, I think the adb push $HOME/Backup/phablet /home/ hit an error on a read-only folder and stopped before it hit those two crucial files.



  • @jaytee said in Cannot migrate data to a new device:

    If anyone else has this issue, I think the adb push $HOME/Backup/phablet /home/ hit an error on a read-only folder and stopped before it hit those two crucial files.

    I think you have to be in dev mode to have access to those files.



  • See this topic too https://forums.ubports.com/topic/1498/backup-complete-device/4?_=1586824247414
    And other topics related to "adb pull /data/system-data" and "adb pull /data/user-data" .



  • @jaytee
    Well yes, the rootfs is read only.
    Basically you only have access to /home/phablet/

    Your method might have worked for user-data and if pushed to the phablet's home directory.
    You cannot write to / (without messing with the system at least)



  • @AppLee @Keneda Many thanks - very helpful!



  • Yep..that does indeed work.Many thanks indeed.It'll also be useful now to know where messages/contacts etc are stored so I can run a regular backup to my home server.My Nexus 5 has just died but I bought another identical one as it was so good.All my history and messages have transferred across with no problems


Log in to reply