How to setup scheduled XUNO Backups

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 backup all of your XUNO data in case of an emergency. 

  

In this article

 

Setting up the backup script

Within the '/secure' of the XUNO installation, there are two backup files. To setup an automatic backup, you will need to add some credentials to your file

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

  4. backupsettings.config lines 12-15:
    
    SET backuppath=<insert backup path>
    SET mysqlusername=<mysql username>
    SET mysqlpassword=<mysql password>
    SET mysqldatabase=<mysql xuno database>
    	
  5. Save the backupsettings.config file
  6. 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 after a few moments. 
  7. Navigate to the location specified on line 12 of the backupsettings.config file. If the backup file is there, the backup script has successfully run. 

  

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.

  3. line 25: 
    <UserId>{{ domain account - eg. xunosrv1/administrator }}</UserId>
    
    line 53: 
    <Command>"{{ path to backup.bat - eg. C:/websites/xuno/secure/backup.bat  }}"</Command>
    	
  4. Save the changes made to the file.
  5. On the server that hosts XUNO, run the task scheduler program. 
  6. Select the task scheduler library from the left column.
  7. Click the Action button on the window header, then click the Import Task button.
  8. Navigate to the XML import file, and click Open.
  9. Review the import information, then click Ok.
  10. Type in your user account password, and click Ok.
  11. 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.

Still need help? Contact Us Contact Us