My Confluence instance has 50,000+ rows of hardcoded links. Is it possible to change them with an update script (SQL Server 2008) using __ATLASSIAN_BASE_URL__? For example
UPDATE
LINKS
SET DESTPAGETITLE =REPLACE(DESTPAGETITLE,'//hstnwikiweb','__ATLASSIAN_BASE_URL__'
)
WHERE
DESTPAGETITLE
LIKE
'%//hstnwikiweb%'
UPDATE
BODYCONTENTSET BODY =CAST(REPLACE(CAST(BODY ASvarchar(MAX)),'//hstnwikiweb','__ATLASSIAN_BASE_URL__')AStext)
WHERE
BODY
LIKE'%//hstnwikiweb%'
Hi Derek,
I'm not sure whether the SQL would work for you or not, but you could certainly take a backup and give it a try. However, when I read the title of your question my first thought was that you should export your data to XML, open it in a text editor and use the Find+Replace function to replace the URLs and then re-import the data. So, in the event that the SQL doesn't work then try editing the XML and see whether that works for you.
All the best,
John
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.