Migrating Yourls
-
Hi there,
so far I worked this way:- setup yourls with directory user credentials
- installed couple of plugins
- worked with credentials from cloudron
Then I migrated database:
- dumped database from other installation and uploaded to /tmp
- dropped tables from cloudron yourls db as per doc: https://docs.cloudron.io/guides/import-mysql/
- succeded with import (redirections work)
But now login doesn't work anymore. What I tried:
- removing and adding users and groups.
Still, can't log in anymore. Is the Yourls Cloudron connection in the database? Will it not be recreated, when I change access for users and groups?
-
If you have installed yourls with Cloudron usermanagement then LDAP is configured directly via an extra php file in the package automatically https://git.cloudron.io/cloudron/yourls-app/-/blob/master/config-cloudron.php?ref_type=heads
Do you have any errors somewhere?
-
Only on the yourls login: "Invalid username or password"
The app event log shows the (successful?) change of operators and access restriction changes before.No errors I could find elsewhere.
Where should the config-cloudron.php file be found? Can't see it.
Yes I installed the cloudron user management option. -
The file is part of the package, found under
/app/pkg/
but I don't think that is the issue. Can you double check that those environment variables exist in the package if you open a webterminal and run theenv
command?Since you have imported a database set from another app, maybe you have imported users with the same username which were previously not on LDAP but are internal users and thus the credentials don't match now?
-
... with the env command I get a lot of references to an LDAP service indeed. Please let me know, which of them I need to check.
From what I know the users aren't even in the database, but in a local file. They also had other names, as we shared access before. Happy to get a central SSO user management with cloudron now...
(the "config-cloudron.php" is at its designated place)
-
Ok so I was just rereading your initial message. So you had installed Yourls normally and used it with the SSO feature just fine. Then you dropped all tables of that instance and imported some external Yourls database?
Such unknown states are quite hard to assess and properly support. Have you tried to put the app in debug mode by adding
define( 'YOURLS_DEBUG', true );
in the/app/data/user/config.php
? -
I found the culprit - Simple LDAP Auth Plugin was deactivated. Not sure how (I?) caused it in the process.
Now I can confirm this way its working - moving yours from old server to cloudron, keeping existing URL. For all migrations, I started to move DNS management with the existing DNS records to be managed by cloudron.
- setup yourls with directory user credentials in a temporary (sub)domain,
- install your custom plugins (if you had any),
- make sure, your plugins are activated, especially "Simple LDAP Auth Plugin",
- make sure custom yourls settings in /app/code/user/config.php are the same like before (especially: YOURLS_URL_CONVERT and YOURLS_UNIQUE_URLS),
- dump existing database from other installation and uploaded to /tmp,
- drop existing tables from existing cloudron yourls db as per https://docs.cloudron.io/guides/import-mysql/,
- import database dump, as described in the guide,
- confirm your redirects are still working,
- move yourls to the final location.
Done - without interruption, as DNS will switch from old server to cloudron, if you set DNS to be managed by cloudron.
-