You can backup all of your data for nBill, or even your entire Joomla! or Wordpress site, using the backup/restore feature. This feature backs up the data held in your database only, not the actual program files. You can also restore a previously saved backup from here, and again, you can choose to restore just the nBill tables, or the whole website (the latter obviously would only work if you had backed up the whole site).

Warning! Do not rely on this feature - you should have other provisions for backing up your data. It is not always possible for nBill to backup and restore your data successfully especially if you have a lot of data. Backup files generated with different versions of MySQL (your database server software) may not be compatible with each other.

To access the backup/restore page, select ConfigurationĀ­->Backup/Restore from the main menu as shown in figure 3.11

Figure 3.11.1 - Accessing the Backup/Restore Page

This takes you to the screen illustrated in figure 3.11.2.

Figure 3.11.2 - Backup/Restore


You are offered two different links for downloading a backup of your data. The first just contains the data in your nBill tables (those tables are prefixed with #__nbill in your database - where #__ is your database table prefix - eg. mfrws_nbill_vendor). The second link will download a backup of all of the tables in your Joomla! or Wordpress database (even those not relating to nBill).

Please note: The backup file is an unencrypted plain text mySQL dump. This means that all of your data, including your clients' names and addresses are plainly visible in the file. You should therefore be very careful about where you store your backups! Do not store them on your web server, as that would put it at risk - even if it was stored in a private area, it could still be vulnerable to a directory traversal attack.

Technical Note: The backup file consists of some comment lines and mySQL queries. If you do a search and replace on the file to change all occurrences of #__ to your actual database table prefix, it would be possible to run the entire contents of the file as an SQL query (eg. in phpMyAdmin) to restore the database. To be able to restore the file via nBill though, the comments and #__ prefix should be left intact.


If you have a backup file that contains all of your tables, you can choose whether to restore all of the tables or just the nBill tables. If the backup only contains the nBill tables and you select to restore all tables, naturally only the nBill tables will be restored - the others will remain untouched.

Select a backup file from your computer using the 'Browse...' button, and click on 'Restore' to perform the restoration.

WARNING! Restoring from a backup file will wipe out the existing contents of your database. If anything goes wrong during this process you could lose everything! Therefore, only use this feature as a last resort or if you have nothing to lose!

Note: You cannot restore a file that was backed-up using a newer version of nBill. In that case, you would first have to upgrade to the newer version before running the restoration process.

Tip: You can use the backup and restore feature to copy the contents of one copy of nBill onto another server (eg. if you are running a local test site as well as a live site and want to copy data from one to the other).

Technical Note: If you backup on one server and restore on another, this will only work if the versions of mySQL on each server are compatible. Trying to restore a backup that was made on a newer version of mySQL onto a server running an older version of mySQL might cause errors. In that case, you would need to manually amend the backup file to remove any elements that are not supported in the older version of mySQL.