Backup and Restore
Explanation
An XWiki instance keeps its data in several places, and a backup that misses one of them cannot bring the instance back. Where each part lives decides which tool copies it:
Back Up an XWiki Instance copies all of them and Restore an XWiki Instance puts them back, each using the command of your own database from Database Backup and Restore Commands. Automate a Backup with a Shell Script turns that procedure into a job a scheduler can run every night.
Back up the database with the database's own tool rather than by exporting the wiki Pages, because an export holds neither the files nor the data the wiki keeps outside its Pages: XAR Export as a Backup Method.
How often to back up follows from how much work you can afford to redo, so a wiki written to every day needs a daily backup. Two moments call for one whatever the schedule says: before an upgrade, and before a change to the database or to the configuration that you are not sure you can undo.
A backup is only proven once it has been restored. Restoring it on a second server, which makes that server an instance clone, both tests the backup and gives you somewhere to try the next upgrade out.
FAQ
Are the extensions I installed part of the backup?
Yes. Their metadata is in the database and their files are in the extension sub-directory of the permanent directory.
Can I use a backup to move the wiki to another server?
Yes: restore it there. Follow Clone an XWiki Instance instead if both instances are to run at the same time, and Move XWiki to a New Server and Upgrade it if you also change version.
More
To find more about the current topic, you can search or use the table below and filter the columns to narrow your choices.