The repository can be backed up two ways: by backing up your database or by using the export feature built into rBook. rBook's export feature builds an XML image of the whole repository (users, categories, and recipes) that is database independent and also data-model independent (assuming any changes to the data-model going forward are minor). So backups of previous versions can be imported into new versions of the repository. Therefore, it is recommended that you use rBook's export feature to backup your repository.

You must be defined as an administrative user inside the rBook system to export or import a repository.

To use rBook's export and import features you have to enable them. This is disabled by default, but to enable it you have to do a few things:

  1. Create a directory to store your export files. This should either be in a directory outside your directory hierarchy available via HTTP or you should configure Apache's .htaccess to deny permission to the files in that directory. Either way, you don't want these files to be available to your http server. Make sure that this directory is writeable by the webserver process.
  2. Edit the config.php file and uncomment the line that has define("IMPORTDIR", ...) and specify the directory you created in step 1. For example, define("IMPORTDIR", "/home/foobar/export");.

Once you created and specified the IMPORTDIR and logged into rBook as an administrative user you will have two additional menu options in the Admin box: Export and Import. When you select the Export menu item, you will be prompted for a file name to export to (no directory is required since it writes to the directory specified in the IMPORTDIR parameter). Click submit and it will generate the XML file to the IMPORTDIR directory.


When you backup the repository to an XML file it exports all the users, categories, and recipes in the repository. Therefore, importing the XML imports all the users, categories, and recipes into the repository. All users, categories, and recipes that were previously in the repository will be clobbered.

To import a file, the file must be in the directory specified by the IMPORTDIR parameter in the config.php. If it is there, select the 'Import' menu option from the Admin menu. This will list all the files in the IMPORTDIR directory. Select the file you want to import, and select Submit. This will import the file and log you out. You must log in as one of the users specified in the export file