UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Migrate data from device to device

    Scheduled Pinned Locked Moved Support
    34 Posts 12 Posters 14.7k Views 7 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T Offline
      thepeter
      last edited by thepeter

      Consider this my "log" how I've transferred data from phone to phone (worked between two nexus 5 devices) without SD card
      I hope it will be helpful for somebody - but I've basically used combination of two methods described before plus some man pages
      NOTE: both devices have ubports image installed and are prepared for adb access ()

      Source device

      After connecting source device on PC commands in terminal as follows:

      1. Reboot phone into recovery: adb reboot recovery
      2. Acquire root: adb root
      3. Activate shell: adb shell (command prompt will change to # sign)
      4. Backup system-data (this will also create log files, that can be examined for possible errors) :
        tar -czpv -f /system-data.tgz /data/system-data/ >/system-data.out 2>/system-data.err
        NOTE: I've just put these files into root directory and it went just fine šŸ˜‰ and pulled just one file into connected computer since adb has much better chance to transfer one big file without errors than many small ones
      5. logout from shell to your terminal (Ctrl+D)
        NOTE: I am assuming computer is linux with root access etc.
        this sub-step can be done before step 3
        5.1 go to directory where backup data are to be stored in PC (using cd and mkdir commands)
      6. transfer data from phone to PC adb pull /system-data.tgz
        6.1 it is good idea to have logs copied too adb pull /system-data.out and adb pull /system-data.err but it is not necessary
      7. steps 3. to 6. repeat but with user-data instead of system-data excluding .cache folder
        (so commands will look like tar -czpv -f /user-data.tgz /data/user-data/ --exclude='*data/user-data/phablet/.cache*' >/user-data.out 2>/user-data.err, adb pull /user-data.tgzetc.)
        NOTE: data which can be transferred by MTP should be moved that way since process of packing can take quite long for user data and may even stop/fail (e.g. not stopping process, just waiting and overheating battery, because all outputs are transferred to log files) if there is not enough space for package

      Destination device

      1. Reboot phone into recovery: adb reboot recovery
      2. Acquire root: adb root
      3. Push archived data from PC to phone (root folder) adb push ./system-data.tgz / and adb push ./user-data.tgz /
        NOTE: in case of failure pushing both files and then unpacking both in adb shell it is possible to work the process "per partes" so following steps 4. and 5. will be done after each push and removing archive from phone (rm ./system-data.tgz in adb shell and then returning by Ctrl+D to PC shell)
      4. Activate shell: adb shell (command prompt will change to # sign)
      5. Extract archives tar -xzv -f /system-data.tgz and tar -xzv -f /user-data.tgz
      6. Restart phone, unplug, recharge (battery will be probably rather low šŸ˜… ) check data and switch SIM card šŸ˜€

      PS:

      After finishing and documenting the process, I'we found out that WiFi settings has not been transferred to destination device 😐 those must be somewhere in .cache folder then (I don't really mind, messages, apps, contacts and other settings are quite enough for me)

      T 1 Reply Last reply Reply Quote 3
      • T Offline
        TartanSpartan
        last edited by TartanSpartan

        This is great information and thank you guys for the guide. It truly helped me migrate from an M10 with a shattered screen (but the touchscreen still works) to a new one with bigger storage. But I'd like to make my own recommendation on top of this. @thepeter recommends to exclude *data/user-data/phablet/.cache*. This makes sense in general (most app cache directories are pretty disposable and will be rebuilt automatically and as necessary on your new device), but I would take an extra (as in, separate from the main archives you compress) .tgz archive of .cache/libertine-container/ (if you have one or even more than one container) as this will copy over all Libertine apps, app icons, dependencies, the container's rootfs etc. It's arguably just as important as user-data.tgz as that one copies the main Ubuntu Touch apps.

        Are there any other directories within .cache which people think would be worthy of backing up and migrating, for genuinely useful and essential stuff like the Libertine apps, and so which should be made an exception to the exclusion command criteria?

        1 Reply Last reply Reply Quote 0
        • MoemM Offline
          Moem
          last edited by

          I'm probably asking too much, but it can't hurt to ask...

          Is there any method to migrate data from device to (identical) device that does not involve the command line? I'm not a friend of the terminal at the best of times, and that's on a laptop. The terminal on UT, I'm sorry to say, makes me cry for my mother. 😢

          Is currently using an Op5t
          Also owns an Op1, a BQ E4.5 and an Xperia X, as well as a BQ tablet and a Pinetab2. Please, someone... make it stop.

          LuksusL AppLeeA C 3 Replies Last reply Reply Quote 1
          • LuksusL Offline
            Luksus @Moem
            last edited by

            @moem If you have a nextcloud, you can use UBsync to sync all the data you need.
            You could even sync your .config folder to keep app-configs.
            But apps itself, should be reinstalled I think.

            Devices: BQ e4.5, Fairphone 2, Fairphone 3, Lenovo X605F, Pinephone, Moto Z2 Force, OnePlus5T

            MoemM 1 Reply Last reply Reply Quote 0
            • KenedaK Offline
              Keneda
              last edited by

              A "Save & restore" app would be so usefull in open-store... I'm really not confident with command line.

              2015-2023 : Meizu MX4 ā˜ ļøāš°ļøāœļø
              2023-2024 : Nexus 5 ā˜ ļøāš°ļøāœļø
              2024-***** : FPOS Fairphone 5
              šŸ‡²šŸ‡«šŸ‡¬šŸ‡§

              1 Reply Last reply Reply Quote 1
              • AppLeeA Offline
                AppLee @Moem
                last edited by

                @moem
                AFAIK and at this point the answer is no.
                BTW I don't think having different Ubuntu Phones would be an issue except if you want to migrate data from a 16GB to a 32GB (or else, but you get the idea)...
                I think an app makes sense but it will have to be unconfined in order to do the job.

                KenedaK MoemM 2 Replies Last reply Reply Quote 0
                • KenedaK Offline
                  Keneda @AppLee
                  last edited by

                  @applee said in Migrate data from device to device:

                  it will have to be unconfined in order to do the job.

                  Yes like some others ones very usefull (UTTT not to say for ex) ^^

                  2015-2023 : Meizu MX4 ā˜ ļøāš°ļøāœļø
                  2023-2024 : Nexus 5 ā˜ ļøāš°ļøāœļø
                  2024-***** : FPOS Fairphone 5
                  šŸ‡²šŸ‡«šŸ‡¬šŸ‡§

                  1 Reply Last reply Reply Quote 0
                  • MoemM Offline
                    Moem @Luksus
                    last edited by

                    @luksus said in Migrate data from device to device:

                    If you have a nextcloud, you can use UBsync to sync all the data you need.

                    Why would I need other people's computers for that? Can't I just use one of my own?

                    Is currently using an Op5t
                    Also owns an Op1, a BQ E4.5 and an Xperia X, as well as a BQ tablet and a Pinetab2. Please, someone... make it stop.

                    LuksusL 1 Reply Last reply Reply Quote 0
                    • LuksusL Offline
                      Luksus @Moem
                      last edited by Luksus

                      @moem sure šŸ™‚ install a nextcloud instance on your pc and sync your data to it.

                      Devices: BQ e4.5, Fairphone 2, Fairphone 3, Lenovo X605F, Pinephone, Moto Z2 Force, OnePlus5T

                      1 Reply Last reply Reply Quote 0
                      • MoemM Offline
                        Moem @AppLee
                        last edited by

                        @applee said in Migrate data from device to device:

                        AFAIK and at this point the answer is no.

                        Okay, thank you. That is most regrettable. But now that I know, I can stop searching.

                        I think an app makes sense but it will have to be unconfined in order to do the job.

                        I have no idea what that means but I don't think it would help me if I did.

                        Is currently using an Op5t
                        Also owns an Op1, a BQ E4.5 and an Xperia X, as well as a BQ tablet and a Pinetab2. Please, someone... make it stop.

                        KenedaK 1 Reply Last reply Reply Quote 1
                        • KenedaK Offline
                          Keneda @Moem
                          last edited by

                          @moem said in Migrate data from device to device:

                          I have no idea what that means but I don't think it would help me if I did.

                          He talks about access to all data with r/w rights on the device, like UTTT do.

                          2015-2023 : Meizu MX4 ā˜ ļøāš°ļøāœļø
                          2023-2024 : Nexus 5 ā˜ ļøāš°ļøāœļø
                          2024-***** : FPOS Fairphone 5
                          šŸ‡²šŸ‡«šŸ‡¬šŸ‡§

                          1 Reply Last reply Reply Quote 1
                          • C Offline
                            cliffcoggin @Moem
                            last edited by

                            @moem What sort of data do you want to migrate? If it is in File Manager perhaps you could copy it to a computer and from there to your other phone. I know it works moving photos to and from the phone though I have not tried other sorts of data.

                            MoemM 1 Reply Last reply Reply Quote 0
                            • MoemM Offline
                              Moem @cliffcoggin
                              last edited by Moem

                              @cliffcoggin said in Migrate data from device to device:

                              If it is in File Manager perhaps you could copy it to a computer and from there to your other phone.

                              Thank you Cliff! I have done almost exactly that: I connected both phones to my laptop with USB cables, and copied my photos directly from one phone to the other. I have also moved my exported contacts and my custom ringtone in a similar way. Those things were the most important bits of data, so I'm well on the way.
                              My app settings and settings of the phone itself, well, I'll just have to redo them. Not a very big deal.

                              Also: whenever I want to move a small bit of data (such as some words or numbers and it's too much to type over... or one image) from one phone to another or from phone to laptop or vv, then I just send it to myself through Telegram / Teleports.

                              So there's not one streamlined solution, but there are a number of usable workarounds.

                              Is currently using an Op5t
                              Also owns an Op1, a BQ E4.5 and an Xperia X, as well as a BQ tablet and a Pinetab2. Please, someone... make it stop.

                              C 1 Reply Last reply Reply Quote 0
                              • C Offline
                                cliffcoggin @Moem
                                last edited by

                                @moem I am all for the simplicity of a cable connection and a point&click mouse. Have you given up with your old phone?

                                MoemM 1 Reply Last reply Reply Quote 0
                                • MoemM Offline
                                  Moem @cliffcoggin
                                  last edited by

                                  @cliffcoggin said in Migrate data from device to device:

                                  Have you given up with your old phone?

                                  Not at all! In fact, I have moved from the beat-up-but-functional OpO that I got cheap to experiment with, to the good-as-new one that was running LineageOS up to yesterday. Because by now I figure that the experiment is over, the results are in, and UT is here to stay.
                                  The 'beater' phone is going to be handed over to a developer I know who may be able and willing to help with Axolotl, the UT client for Signal. He can borrow it so he can, in turn, use it to experiment. And hopefully Axolotl will be gaining some improvements. In short, everyone wins here. šŸ˜„

                                  Remarkably, installing UT was a lot easier this time, it went pretty smoothly. I believe there have been some helpful changes to the installer.

                                  Is currently using an Op5t
                                  Also owns an Op1, a BQ E4.5 and an Xperia X, as well as a BQ tablet and a Pinetab2. Please, someone... make it stop.

                                  1 Reply Last reply Reply Quote 1
                                  • T thepeter referenced this topic on
                                  • T Offline
                                    thepeter @thepeter
                                    last edited by

                                    @thepeter just to add that if /data doesn't contain system-data and user-data (better said it is just empty) thing that might help is on phone side mounting it by:

                                    mount /data
                                    

                                    that should help (thanks to people in telegram group for quick help)

                                    1 Reply Last reply Reply Quote 0

                                    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                    With your input, this post could be even better šŸ’—

                                    Register Login
                                    • First post
                                      Last post