Migrating from one App to another


Sometimes, an App gets forked, as it happened recently with ownCloud and its new fork Nextcloud. Sometimes, a developer would make it particularly easy to let users take their data from an old App and use it in their new App. Sometimes, major versions of Apps are sufficiently different from each other that in UBOS, we effectively treat them as different Apps (such as Nextcloud 9 and Nextcloud 10).

Under any of these circumstances, the user needs to be able to tell UBOS to migrate their data and configuration to a new App.

How to migrate from one App to another

For simplicity, let’s assume that a device only runs a single Site, and at that Site, a single App is installed that needs to be migrated to another App. Let’s assume that the Site has hostname In case of more complex setups, different options to the backup and restore commands should be used (e.g. only some Sites instead of all), otherwise everything is the same.

Let’s take a real-world example, and assume you want to upgrade from nextcloud9 to nextcloud10 (Note: this is a historical example.)

  1. Create a backup of the existing Site, such as:

    % sudo ubos-admin backup --host --backuptofile before-migration.ubos-backup
  2. Undeploy the Site, such as:

    % sudo ubos-admin undeploy --host
  3. Restore the backup, instructing UBOS to swap out nextcloud9 and replace it with nextcloud10:

    % ubos-admin restore --in before-migration.ubos-backup --migratefrom nextcloud9 --migrateto nextcloud10

This will restore your Site into the same location (hostname, context path), restore and migrate all your data, but run nextcloud10 going forward instead of nextcloud9.

And if it didn’t work? (It should!) Then simply undeploy the new Site, and restore from the backup without replacing the App. Also, tell us about it so we can fix what needs fixing.