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

    Backup and Restore scripts

    Scheduled Pinned Locked Moved Support
    6 Posts 6 Posters 848 Views 4 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.
      • AntiDroidA Offline
        AntiDroid
        last edited by

        I made a couple of bash scripts to backup and restore my UT phone home directory a while ago and decided to put them up on github in case they are useful to others.

        Tested on Ubuntu 20.04 host and OnePlus One Bacon OTA-15

        • Requires Android debug tools on linux host system
        • Interative selection of directories to backup and restore
        • Creates dated backups for later restoration
        • Not tested for cross device restoring or restoring after updates
        • Includes hidden directories but not special directories

        Run

        UT_Backup_Tool.sh
        

        to make a dated backup in a folder next to the scripts.

        Run

        UT_Restore_Tool.sh
        

        to selectively restore the home directories. You will get to choose the backup and which directories to restore.

        OnePlus One with UT OTA-15 daily driver. I would be testing the Halium 7.1 port if I could roll back to OTA-15
        OnePlus 6T PostmarketOS Custom Gnome on Mainline Kernel

        1 Reply Last reply Reply Quote 7
        • WebmustW Offline
          Webmust
          last edited by

          [EN] - Hello to all,

          I take advantage of AntiDroid's topic (I love this nickname) to talk about Backup and Restore.

          It's been almost 10 years since Ubuntu Touch was launched and there is still no total backup and restore easy to use.

          I am, myself, a bad coder (developer) and I have difficulties to use the command lines. Besides I don't even speak English 😞
          NOTE: It's time consuming and difficult to copy/paste into a translator all the time.

          Despite this, I will try to do it... For me, it will be long and difficult (several weeks to several months if you help me). For the best developers and connoisseurs of UT UBports this is a formality that would not take more than 2 or 3 hours.

          Here is the idea:
          Seeing that it is simple, through the "UT Tweak Tool" application ( https://open-store.io/app/ut-tweak-tool.sverzegnassi ), to access the "cache", "data" and "config" of each application to selectively delete them, it should be just as simple, with very little adaptation to select what you want to save.

          With the work of AntiDroid (above) we have again a good basis to work with.

          Restoration seems to me to be a very simple function.

          So we have an application that can integrate these backup and restore functions with a very advanced graphical interface for these new functions and we have the work of AntiDroid.

          The backup application should only allow you to simply choose the applications to backup + personal folders.

          The result should be a simple compressed archive. For example in .tar.gz or something like that.

          The application will also have to allow an output of the contacts directory in .vcf via the GUI with the following command (this command changes depending on the language - here for English speakers):

          syncevolution --export /home/phablet/Documents/UT-contacts.vcf backend=contacts database=Personal
          

          NOTE: I believe there is a similar command for CalDav.

          There is also a button that should allow restoration:

          syncevolution --import /home/phablet/Documents/UT-contacts.vcf backend=contacts database=Personal
          

          In short, we have everything we need to create this function which is absolutely fundamental! Let's go, let's do it?

          Thanks

          Translated with www.DeepL.com/Translator (free version)

          .

          .
          [FR] - Salut à tous,

          Je profite du sujet d'AntiDroid (j'adore ce pseudo) pour parler de Sauvegarde et de restauration.

          Voilà bientôt 10 ans qu'Ubuntu Touch aura été lancé et il n'y a toujours pas de sauvegarde et de restauration total simple à utiliser.

          Je suis, moi-même, un mauvais codeur (développeur) et j'ai des difficultés à utiliser les lignes de commande. En plus je ne parle même pas Anglais 😞
          NOTE : C'est long et difficile de faire des copier/coller dans un traducteur en permanence.

          Malgré cela, je vais essayé de le faire... Pour moi, ce sera long et difficile (plusieurs semaines à plusieurs mois si vous m'aiderez). Pour les meilleurs développeurs et connaisseurs d'UT UBports tout cela n'est qu'une formalité qui ne prendrait pas plus de 2 ou 3 heures.

          Voici l'idée :
          Constatant qu'il est simple, par l'intermédiaire de l'application "UT Tweak Tool" ( https://open-store.io/app/ut-tweak-tool.sverzegnassi ), d'accédé au "cache", au "données" et à la "Config" de chaque application pour les supprimer sélectivement, il doit être tout aussi simple, avec très peu d'adaptation de sélectionner ce que l'on veux sauvegarder.

          Avec le travail d'AntiDroid (ci-dessus) on a là encore une bonne base de travail.

          La restauration me semble être une fonction très simple.

          On a donc une application qui pourra intégrer ces fonctions sauvegarde et de restauration avec une interface graphique très avancée pour ces nouvelles fonction et on a le travail d'AntiDroid.

          L'application de sauvegarde devra uniquement permettre de choisir simplement les applications à sauvegarder + les dossiers personnels.

          Le résultat devrait être une simple archive compressée. Par exemple en .tar.gz ou quelque chose comme ça.

          L'application devra aussi permettre une sortie du répertoire des contacts en .vcf par l'intermédiaire de l'interface graphique avec la commande suivante (cette commande change selon la langue - Ici pour les francophone) :

          syncevolution --export /home/phablet/Documents/UT-contacts.vcf backend=contacts database=Personnel
          

          NOTE : Je crois qu'il existe une commande similaire pour CalDav.

          La aussi, un bouton doit permettre la restauration :

          syncevolution --import /home/phablet/Documents/UT-contacts.vcf backend=contacts database=Personnel
          

          En bref, on a tout ce qu'il nous faut pour créer cette fonction qui est absolument fondamentale ! On y va, on se lance ?

          Merci.

          He who gives in to fear will live in terror!

          My divices since 2013:
          Nexus 5 (with UT) ••• Nexus 7 Wifi (with UT) ••• bq E4.5 (2x UBed) ••• bq M10 FHD (UBed) ••• Fairphone 2 (with UT) ••• OnePlus 6T (with UT) ••• Fairphone 3+ (2x with UT)

          K A 2 Replies Last reply Reply Quote 3
          • K Offline
            kristatos @Webmust
            last edited by

            @webmust The commands for the calendar-data are similar, because it's also based on syncevolution:
            Show the separate calendars:

            syncevolution --print-databases
            

            Export the calendar you wish to (e.g. personal):

            syncevolution --export /home/phablet/Documents/calendar.vcf backend=evolution-calendar database=system-calendar
            

            And import into another installation:

            syncevolution --import /home/phablet/Documents/calendar.vcf backend=evolution-calendar database=system-calendar
            

            I've migrated my adressbook and calendars this way from my E4.5 to the volla last week.

            BQ Aquaris E4.5 (UT 16.04)
            Vollaphone (UT 20.04)

            1 Reply Last reply Reply Quote 1
            • N Offline
              nero355
              last edited by

              You could ofcourse setup your own NextCloud Server and sync everything with the NextCloud app : https://open-store.io/?sort=relevance&search=nextcloud 🙂

              Also since it's a Linux based OS the only data you should need is everything inside your /home/phablet/ directory 😉

              My phones :

              • BQ Aquaris E5 HD Ubuntu Phone Edition - Ubuntu Touch 16.04 LTS
              • ZUK Z2 Pro - ZUI Android 8.x
              • Xiaomi Mi 9T - Jolla SailFish 3.4.x Community Build

              P.S. : I am NOT a developer! ;)

              1 Reply Last reply Reply Quote 1
              • A Offline
                aarontheissueguy @Webmust
                last edited by

                @webmust Ive been thinking about creating a small backup application for UT esspecially because I also want to provide one in WaydroidHelper too.

                No promisses though when this will happen. Might be a week might be a month or longer. Whenever I find time for it.

                messayistoM 1 Reply Last reply Reply Quote 3
                • messayistoM Offline
                  messayisto @aarontheissueguy
                  last edited by

                  @aarontheissueguy O yeah, that would be great! Thank you!! - I think of the transition to 20.04. Some devices will no longer be supported and there might be some people who would highly appreciate such an useful app. To get their data onto their next phone...

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