How to relocate permanent data directory?

Hi everyone,

I think I made some mistake. I’m just learning how to use XWiki. Since it proved itself quite well, I wanted to clean up my installation and tried to move the permanent data directory to another location.

Apparently, that’s either not possible or I did some mistake. :frowning:

I googled quite a bit how to “xwiki relocate permanent data directory” and the like before attempting to do this, but did not find any specific instructions. I found forum entries about moving a whole xwiki instance to different servers or even different operating systems, so I assumed that relocating the permanent data directory should be easily possible and the lack of documentation about how to do it or why it should or cannot be done was an indication that it’s trivial.

Using the XWiki Debian packages (recently upgraded from 10.8.0 to 10.8.1), the permanent directory is located at /var/lib/xwiki by default.

  1. I simply shut down tomcat8,
  2. did mv /var/lib/xwiki /mnt/some_other_location/xwiki,
  3. adjusted environment.permanentDirectory /etc/xwiki/xwiki.properties
  4. and started tomcat8 again.

Xwiki seemed to start up successfully and the pages are visible, however at least the “Navigation Tree” is totally empty now, which makes it extremely hard to navigate the Wiki structure.

I immediately shut down tomcat again, rverted my changes to the configuration and bind-mounted the new directory to the old location, so that everything should look to Xwiki as before. Still, after starting tomcat again, the “Navigation Tree” is still empty. :frowning:

There are not any errors in the Xwiki log files with the default log settings, though.

What did I do wrong and what’s the best way to recover from this situation without losing the effort already spent into entering content into the system?

I also think that there should be a big warning in the documentation that one cannot move the permanent directory once Xwiki has been set up, or alternatively instructions how to do it without shredding the Xwiki instance… :-/

Thanks for any hints or pointers to the documentation which I may have missed!

Regards,

Gunter

I just randomly stumbled across this posting:

After the update, page navigation disappeared

which indicates that the problem with the Navigation Area I’m facing is related to my 10.8 → 10.8.1 upgrade instead of my attempt to relocate the permanent data directory.

So did I actually perform it the right way? After applying the workaround mentioned in the posting liked above, the Navigation Area is working again for me.

It’s because there’s no issue associated to doing this :wink:

You need environment.permanentDirectory to point to /mnt/some_other_location/xwiki.

That’s not related to the perm dir. All pages are stored in the DB. Just hard refresh your browser cache.

No we won’t put that since it’s completely allowed and works fine :wink:

Thanks!