Backup and Restore process not documented well


I am testing backup and restore for this product and it doesnt seen to work as the admin guide says

The process I am simulating is backup everything and delete one of my wiki dtests and restoring it from backups

I backed up all the files and did a mysql backup of database as shown

  • WEB-INF/xwiki.cfg (old XWiki configuration file but still used)
  • WEB-INF/hibernate.cfg.xml (Hibernate configuration)
  • WEB-INF/ (new XWiki Configuration file)
  • WEB-INF/classes/logback.xml (Logging configuration)
  • WEB-INF/observation/* (Cluster configuration)

mysqldump --add-drop-database --databases dtests > dtests.sql

My wiki name is dtests

So as per procedure, I backed up the database and everything as per wiki admin guide.

I now delete the wiki fully from global wiki administration ie : dtests. So all the database and wiki is deleted

Now to restore data as per procedure i did


mysql -e “DROP DATABASE dtests;”


mysql dtests_new --user=root -p < dtests.sql

Re-enable constraints checks: mysql -e “SET FOREIGN_KEY_CHECKS=1;”

then restart tomcat service

The procedure documented on your portal stops here. .

What must be done for me to see this wiki back as i dont see it in the global wiki list ??


What is dtests? Is it the main wiki’s name or a subwiki?

You said you’re backuping everything but it seems you’re only backuping a single wiki since you don’t use --all-databases.

So my guess is that dtests is only a subwiki and not the main wiki. So, you’re not backuping nor deleting everything. It should be ok but I’m mentioning it since you keep repeating that you “backup everything” which doesn’t seem correct.

Seems you’re recreating a different database here. Please follow the instructions at (they are correct but if you don’t follow them it cannot work of course ;)).

So what you’ve done is create a new DB that’s all. But a wiki is not just a DB. There are also metadata in the main wiki about the subwikis (called the wiki descriptor). So the wiki descriptor points to a dtests DB, not to a dtests_new one.

So, I don’t see what is wrong in the documentation. AFAICS it’s very well documented :slight_smile:


Aim is to backup single subwiki , trash the subwiki and restore it fully and make the subwiki fully live via web portal.

dtests is a sub WIKI i created . This demo i am doing is to backup/restore just that database and the subwiki rather than restoring all other databases.

The restore process in that link talks about restoring mysql database so i think you pretty much nailed it down that the wiki descriptor points to a dtests DB, not to a dtests_new one.

The question rather should have been what must be done to see the sub wiki restored back? This is the info which i think is not very clear as i am following that same tech note you just send.

I tried the manual XAR import/export approach and that works but ideally, i would want to validate a full backup restore of a sub wiki in the proper way using mysql backups just in case the subwiki is deleted accidentally.

Follow the doc? :slight_smile: Just name it the same way as it was. A restore is supposed to be the same as before as otherwise it’s not a restore, it’s something new and different.

Did you try it (to name the DB dtests)? It should work fine.