How to set up scheduled XUNO backups for on premise schools

Setting up scheduled backups for your XUNO is important for data integrity and safety purposes. While we don't have control over how often and where you backup your XUNO Suite, we do want to provide you with a simple way to back up all of your XUNO data in case of an emergency. 

  

In this article

Setting up the backup script

Within the 'secure' folder of the XUNO installation, there are two backup files (autoimport.bat and backup.bat). Before you setup an automatic backup of XUNO, you will need to add some credentials to the backupsettings.config file

    1. Navigate to the 'secure' folder within the XUNO installation. 
    2. Find the file named 'backupsettings.config.sample'.
    3. Edit the backupsettings.config.sample file, and fill out the backup path and the database details

backupsettings.config lines 12-15:

SET backuppath=<insert backup path>
SET mysqlusername=<mysql username>
SET mysqlpassword=<mysql password>
SET mysqldatabase=<mysql xuno database>
	
  1. Save the file as backupsettings.config
  2. Run the backup.bat file within the secure folder, this will attempt to backup your XUNO files and database to the location you provided in step 3. Do not close the cmd window that will appear. The backup may take a few minutes to complete. Once completed, the cmd window will close itself. 
  3. Navigate to the location specified on line 12 of the backupsettings.config file. If the backup file is there, the backup script has successfully completed. 

  

Automating the backup script to run - Manual creation

To make the backup script run at a reoccurring scheduled time, you will need to add a new task within task scheduler. To do this, follow the steps below. 

  1. On the server that hosts XUNO, run the task scheduler program. 
  2. Select the task scheduler library from the left column.
  3. Create a new basic task by clicking on the Create basic task button in the right column actions column.
  4. Within the general tab, add a name and description. 
  5. Click the Run whether user is logged on or not radio button. 
  6. Click the Run with highest privileges checkbox.
  7. Within the triggers tab, click the New button. 
  8. Set the scheduled task to run either daily or weekly, and set a start time to your preferred time (8:00PM recommended). 
  9. Click the Stop task if it runs longer than: checkbox, and select the 2 hour value from the drop-down list.
  10. Click Ok.
  11. Within the actions tab, click the New button.
  12. Set the Action drop-down list to start a program. Set the Program/script: option to the backup file by browsing to the file or typing the path into the input.
  13. Click Ok.
  14. Within the create task window, click Ok to save and exit from the window. 
  15. Right click the new task, click the Run option and wait a few minutes for the task to complete.
  16. Check that the last run result has a value of '0x0', which indicated successful completion. 

  

Automating the backup script to run - Import creation

Alternatively you can import our XML file, available for download here,  which will take care of the majority of the work for you. This file will backup your XUNO database and files every day to the location of your choosing. To import the file, follow the steps below. 

    1. Download the XML import file.
    2. Open the file in a text editor, and enter the required information to lines 25 and 53.

line 25: 
<UserId>{{ domain account - e.g. xunosrv1/administrator }}</UserId>

line 53: 
<Command>"{{ path to backup.bat - e.g. C:/websites/xuno/secure/backup.bat }}"</Command>

  1. Save the changes made to the file.
  2. On the server that hosts XUNO, run the task scheduler program.
  3. Select the task scheduler library from the left column.
  4. Click the Action button on the window header, then click the Import Task button.
  5. Navigate to the XML import file, and click Open.
  6. Review the import information, then click Ok.
  7. Type in your user account password, and click Ok.
  8. Right click the new task, click the Run option and wait a few minutes for the task to complete. 

Make sure the user account you are using to create this task has high level permissions, preferably the server administrator account.