How do I change an app's ID? (Merging servers)

What type of hardware are you using: VPS bought online
What YunoHost version are you running: 12.1.29
How are you able to access your server: The webadmin
SSH

Describe your issue

Hi,

I am merging three YNH servers into one. The same apps are already installed on all servers, but with different domains and content. For example, I have installed the Nextcloud app and the my_webapp app on each server. When I back up the apps, copy them to the target server and want to unpack the backup there, conflicts arise with the second nextcloud and the second my_webapp. Of course, this ID already exists!
Can I manually rename the ID ‘nextcloud’ to ‘nextcloud__1’ from the CLI, for example?

Share relevant logs or error messages

No errors - no logs

It’s currently unsupported by YunoHost itself, but probably can be achieved with backup package surgery if you’re really willing to put the effort

1 Like

That really depends on what app you are dealing with.
If it’s a my_webapp, that woudln’t be hard. Extract the backup on your pc, look for /apps/$app/settings/settings.yml. Try to be consistent. The app id, is used for install_dir, data_dir, db_name and db_user. Look also for any config file that needs to be adapted to the new changes.
Repack it and send it back to the server to be restored.

Make sure you have the list of app ids on your server : yunohost app list | grep id

1 Like

hum yeah but beware of not changing the owner or the permissions of the files in the .tar archive

or to change it to the new app id

1 Like

@jarod5001 Oh, thank you – that sounds good. I’ll give it a try. Yes, at the moment it only affects my_webapp. I’m setting up the nextcloud again anyway. It was just a test system. But in principle, that would have caused a conflict too. But now let’s move on to my_webapp :slightly_smiling_face:

@OniriCorpe Okay, I’ll take that into account. Thank you very much!

@orhtej2 Thank you, but I’m afraid I haven’t delved deep enough into the YunoHost system yet to understand all the technical details.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.