Page tree
Skip to end of metadata
Go to start of metadata

You may wish to backup your Open-AudIT data before upgrading or on a regular schedule. There are two main items to backup. The database and the files. 

Database backup

See here - Reset, Backup and Restore the Open-AudIT database

File Backup on Windows

You can either stop the MySQL and Apache services and then backup the entire c:\xampplite (later c:\xampp) directory or only backup the c:\xampplite\open-audit directory. You don't really need all of the Xampp directories as you can simply use the reinstall at a later stage. If you backup your open-audit directory you will have the config files as well as any uploaded attachments.

File Backup on Linux

Just copy the folder /usr/local/open-audit and you're done.

On both Windows and Linux you might wish to compress (zip or tar.gz) the resulting database and directory files.


Restore the database as per - Reset, Backup and Restore the Open-AudIT database

Once the database has been restored, you may need to go into the web application and run the Admin -> Upgrade routine (if you have not restored to the same version of the program as the backed up database version).

You can also just copy the backed up files back to their original location, overwriting any existing files (if you haven't upgraded between backup and restore).

NOTE - If you have upgraded versions in between backup and restore, only restore the config directory (open-audit/code_igniter/application/config), the attachments directory (open-audit/code_igniter/application/attachments) and the custom images directory (Linux - /usr/local/open-audit/www/open-audit/customer_images, Windows - c:\xampp\htdocs\open-audit\custom_images). If you overwrite the other (Open-AudIT program) files, you will effectively reverse the upgrade you have performed.

NOTE #2 - If you restore the database onto a fresh install or an upgraded install, you will need to update your tasks (if you have any). Run the below.

Windows -

c:\xampp\mysql\bin\mysql.exe -u openaudit -popenauditpassword openaudit -e "UPDATE tasks SET uuid = (SELECT value FROM configuration WHERE name = 'uuid');"

Linux -

mysql -u openaudit -popenauditpassword openaudit -e "UPDATE tasks SET uuid = (SELECT value FROM configuration WHERE name = 'uuid');"