creating clone of xnat with different fqdn

35 views
Skip to first unread message

markiz dosadny

unread,
May 14, 2026, 9:03:52 AMMay 14
to xnat_discussion
Hi
I'm trying to create clone of xnat for test purposes, and in the meantime test migration from stand-alone server to docker-compose.
I came with procedure as follow:
1. I'm spinning up docker infra with same version of xnat and postgres.
2. on old server I'm dumping database to sql file
3. on docker host I'm restoring db with:
   sed 's/xnat.blah.org/dev-xnat.blah.org/g' xnat.sql | psql -U postgres xnat

When I'm trying to login with same credentials as the original one, I got message:


XNAT has encountered an error with your request:

Status Unknown status

URI: Unknown URI

Message Unknown error occurred


Please advise where is error in my small procedure. 
Thanks in advance



Rick Herrick

unread,
May 19, 2026, 10:04:32 AMMay 19
to xnat_di...@googlegroups.com
Can you check the log files for any errors that appear when you try your login attempt? It's hard to know what the specific error is without that context.

Rick Herrick 

Senior Software Developer

ri...@xnatworks.io

https://xnatworks.io | Find us on LinkedIn



--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussi...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/xnat_discussion/69746972-029a-4795-827d-6eae420dd668n%40googlegroups.com.

markiz dosadny

unread,
May 20, 2026, 7:19:48 AMMay 20
to xnat_discussion
Hi. So after a bit of "butchering" docker compose I come up with couple of changes:

make-xnat-config.sh
I added:
if [ ! -f $XNAT_HOME/config/prefs-override.ini ]; then
  cat > $XNAT_HOME/config/prefs-override.ini << EOF
[siteConfig]
siteUrl=$XNAT_SITEURL
EOF
fi

and started working magically.

In the end I decided not to touch database server (not contenerise postgresql), and leave it in place. This way I'll make separate task of upgrading postgresql and then maybe moving to container. I'll see how that go.

Rick Herrick

unread,
May 22, 2026, 10:57:55 AMMay 22
to xnat_di...@googlegroups.com
Cool, glad that's working for you!

I'll burst your bubble and tell you that... it's not really magic :) There are two ini files that XNAT looks for on start-up: settings in prefs-init.ini are only applied if the preference doesn't already have a value set in the system, while settings in prefs-override.ini are applied over whether or not the preference already has a value set. The only place in XNAT that stores the canonical URL for the site is in the preferences (this is not 100% true, but the other place where it's stored is updated automatically when the site URL preference is updated), so, since you've put it in prefs-override.ini, that gets set on start-up and so everything should just work.

Or maybe it is a little bit of magic!

Rick Herrick 

Senior Software Developer

ri...@xnatworks.io

https://xnatworks.io | Find us on LinkedIn


Reply all
Reply to author
Forward
0 new messages