Sven
This depends on many factors like what Database you have in use (e.g. how you installed xWiki) and what capabilities the NAS has (native DB support, only store the files of the local DB on the NAS [not recommended anyway]). IMHO, only viable option is if your NAS can run a supported DB on the NAS itself)
You can backup the DB on the PI to your NAS though.
HTH
I just found out, that my NAS is already running a MySQL Database.
I installed XWiki standalone. There is no problem to reinstall the complete system. During install I can chose to let XWiki install the standard database or to configure manually.
I donβt want the database on the SD Card due to the many I/Os.
The question is how do have I configure XWiki to to use the MySQL Database on the NAS.
You need to create a database on the MySQL Server on your NAS first, then configure hibernate to use this database. Create a dedicated database and user for xWiki on your NAS.
You further need an JDBC driver to make this work. I just dump my documentation I did some time ago:
IMPORTANT: note that the β was moved before the parameters! Otherwise, the settings would not apply
IMPORTANT: you also need to comment out (disable) the default database!
<!-- Configuration for the default database.
Comment out this section and uncomment other sections below if you want to use another database.
Note that the database tables will be created automatically if they don't already exist.
If you want the main wiki database to be different than "xwiki" (or the default schema for schema based engines)
you will also have to set the property xwiki.db in xwiki.cfg file
-->
<property name="connection.url">jdbc:hsqldb:file:${environment.permanentDirectory}/database/xwiki_db;shutdown=true</property>
<property name="connection.username">sa</property>
<property name="connection.password"></property>
<property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
<property name="dialect">org.hibernate.dialect.HSQLDialect</property>
<property name="hibernate.connection.charSet">UTF-8</property>
<property name="hibernate.connection.useUnicode">true</property>
<property name="hibernate.connection.characterEncoding">utf8</property>
<mapping resource="xwiki.hbm.xml"/>
<mapping resource="feeds.hbm.xml"/>
<mapping resource="activitystream.hbm.xml"/>
<mapping resource="instance.hbm.xml"/>
<mapping resource="mailsender.hbm.xml"/>
should be
<!-- Configuration for the default database.
Comment out this section and uncomment other sections below if you want to use another database.
Note that the database tables will be created automatically if they don't already exist.
If you want the main wiki database to be different than "xwiki" (or the default schema for schema based engines)
you will also have to set the property xwiki.db in xwiki.cfg file
<property name="connection.url">jdbc:hsqldb:file:${environment.permanentDirectory}/database/xwiki_db;shutdown=true</property>
<property name="connection.username">sa</property>
<property name="connection.password"></property>
<property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
<property name="dialect">org.hibernate.dialect.HSQLDialect</property>
<property name="hibernate.connection.charSet">UTF-8</property>
<property name="hibernate.connection.useUnicode">true</property>ZZ
<property name="hibernate.connection.characterEncoding">utf8</property>
<mapping resource="xwiki.hbm.xml"/>
<mapping resource="feeds.hbm.xml"/>
<mapping resource="activitystream.hbm.xml"/>
<mapping resource="instance.hbm.xml"/>
<mapping resource="mailsender.hbm.xml"/>
-->
Provide MySQL ODBC Driver
BUT: this would require much re-configuration of the hibernate configuration, so we use the simpler approach and use the MySQL one, since those are 100% compatible