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

    Backup and restore (TWRP-style)

    Scheduled Pinned Locked Moved Unsolved Support
    8 Posts 5 Posters 125 Views 3 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.
      • G Offline
        GooglyBear
        last edited by

        What do Ubuntu Touch users choose if they want a simple and reliable way to backup and restore their phone, preserving the exact state of the OS so that they can 'roll back' if necessary (eg. bricked phone)?

        I haven't really seen a satisfying post about this, so I thought I might as well start the conversation: I'm happy to experiment with different tools and report my findings here as this is a very important feature to me.

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

          @GooglyBear I don't know how TWRP does it.
          I would do the following:

          • copy the entire home directory to the Downloads directory
          • use a cable to transfer that copied home directory to my laptop
          • if I need to restore, use the cable again to transfer it to the phone. I've not tried that part, I think.

          So I'm not sure yet on how to restore but I do know how to backup. Halfway there?

          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
            Charly @Moem
            last edited by Charly

            Hello forum,
            before 24.04 noble I always mounted a USB stick in my cell phone and synchronized the folder /home/phablet to the USB stick using:

            rsync -rtvP --delete --modify-window=5 --delete /home/phablet/ /media/phablet/STICK/phablet/

            or

            rsync aP --delete /home/phablet/ /media/STICK/phablet

            Unfortunately this doesn't work with 24.04 because rsync has been removed from ubuntu touch.

            Best regards
            Charly

            Greetings
            Charly

            UT 24.04 on Volla X23

            G Vlad NirkyV 3 Replies Last reply Reply Quote 0
            • G Offline
              gpatel-fr @Charly
              last edited by

              @Charly

              I have seen one post seeming to say that it was restored in the most bleeding edge version, I can't vouch for it as I use stable, however if you install crackle you can use nix immediately and you can get the nix version of rsync (more up-to-date than the Ubuntu 24.04 version).

              https://gitlab.com/tuxecure/crackle-apt/crackle
              https://gitlab.com/EricHeintzmann/ubuntu-touch/xiaomi-surya/-/wikis/Install-with-crackle

              Once you have crackle running, run 'crackle install rsync' and you are there 🙂

              1 Reply Last reply Reply Quote 1
              • G Offline
                GooglyBear
                last edited by

                I also got some suggestions from the main Telegram group, here is a summary:

                (in the case of a broken Ubuntu Touch installation)

                • you can run the installer again
                  • untick the 'wipe userdata' box
                  • you don't need to reinstall any other ROM

                This is ideal for my use case as I will actually be setting up software mainly on Libertine, Waydroid and Pocket VMs, which are containerised anyway, while the 'host' OS is for day-to-day essentials such as calling and reading documents.

                I am sure taking snapshots/backups of containers is a lot more straightforward than the entire OS (which can be reinstalled to a guaranteed working state anyway): I haven't tried it yet, but with similar tools (Waydroid on Raspberry Pi OS and VirtualBox on MacOS), it was simply a means of copying the files somewhere else and moving them back when needed, so I'm sure it won't be any harder.

                I will write again here if I find a way of performing incremental snapshots (a great storage space saver), or for any other useful information on this topic 🙂

                1 Reply Last reply Reply Quote 0
                • Vlad NirkyV Offline
                  Vlad Nirky @Charly
                  last edited by

                  @Charly
                  rsync is back in the latest 24.04-2.x

                  1 Reply Last reply Reply Quote 0
                  • Vlad NirkyV Offline
                    Vlad Nirky @Charly
                    last edited by Vlad Nirky

                    @Charly

                    rsync -rtvP --delete --modify-window=5 --delete /home/phablet/ /media/phablet/STICK/phablet/

                    or

                    rsync aP --delete /home/phablet/ /media/STICK/phablet

                    Did this preserve the Waydroid directory and its rights?

                    C 1 Reply Last reply Reply Quote 0
                    • C Offline
                      Charly @Vlad Nirky
                      last edited by Charly

                      @Vlad-Nirky

                      The first one is for fat32 fs because it has no rights.

                      If you want copy the rights you need a linux file system like ext4 as target.

                      If you copy to an ext4 usb stick and use rsync with sudo, all different rights should be applied correctly.

                      Thanks for the info of the return of rsync.

                      Will it be possible to have ext4 on the internal micro SD card in the future?

                      Greetings
                      Charly

                      Greetings
                      Charly

                      UT 24.04 on Volla X23

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post