Evopos Help - 2.09.068

Backing up your data

Backing up your data

Previous topic Next topic  

Backing up your data

Previous topic Next topic JavaScript is required for the print function  

It is very important that you back up your Evopos data on a regular basis.

It is also important to test the backup by restoring it onto a different SQL database eg: your computer at home (This is the only true way of knowing that the backup system is working correctly)

There are a number of Backup methods, some manual and some automated.

Note: When you backup an SQL database the process is completed on the actual SQL Server so if you are backing up on a computer other than the one that has the SQL server running on it, then you must ensure the location you are backing up to must be accessible from the SQL Server. For example if you Backup on the Parts computer to C:\Evopos\Backups it will backup to this location on the server not the Parts computer. If you look at that location on the Parts computer it will not be there, if you do not have that folder structure on the server computer it will error. You can use UNC path names so you could backup to \\Parts1\Evopos\Backups but only if that location was accessible from the Server

Warning:

It is your responsibility to ensure your system is backing up correctly.

If you do not have a valid backup and you have a problem (eg: Computer stolen with the backups) you may lose everything and have to re-enter everything, including all your stock, units, contacts, sales etc.


Changing the Backup location

You can change the default backup location on a workstation by going to Settings >> Workstations >> General and setting the Backup default location.

Backup_Loc

This location is relative to the location of your SQL Server database, meaning that Evopos will backup to your selected default location in relation to where  the folder is on the server.

For example, if you set the backup location to C:\BACKUP on any workstation, the backup will always be saved in C:\backup on the server, not the workstations.

NOTE: If you don't set up your own backup location, the default location will be C:/Evopos/Backups on the Server.


Manual Backup from Evopos

Backup your data manually by going to Settings and selecting Backup from the left menu (only displayed when on the System tab).

Confirm the location you want to backup to. Note: This is the location relative to the computer that is running the SQL server, so if the computer you are backing up on is not the server you will need to ensure that location exists on the server. See below for changing the Backup location

When confirmed select OK and the system will backup all of you current data to a single backup file.

Backup_Data

The default name is set determined by the date of the backup. For example EVOPOS_2014_10_21.BKU


Evopos Backup when exiting program
You can set the system to prompt to backup each time you exit Evopos by ticking the option in Settings / Workstation / General. Then each time you close Evopos on that workstation you would click OK when the Backup prompt appears.
You can also set the default path to backup to in Settings / Workstation / General.


Scheduled Backups using Evopos
Evopos has a scheduler that can automatically backup at a specific time however Evopos needs to be open for this to work.

You can automate a Backup by setting a time within the Scheduler. Please refer to the Scheduler topic for more information. See above for changing the Backup location

NOTE: For the Scheduler to back up correctly, the computer must have a user logged in and Evopos must be running at the time of the schedule. If not, Evopos will run any missed schedules the next time you open it.

 


Scheduled Backups using Windows Task Scheduler

One common option is to we use the standard Windows Task Scheduler to backup by running a batch file. Then the Batch file can be scheduled to run from Windows Task Scheduler at a specific time each day.

To setup Task Scheduler:

Search for Scheduler

Create a new Task

Set the Trigger to Daily

Set the program to run to the EvoposBackup.BAT file (see below)

To create the batch file

Open Notepad

Copy and paste the Sample Text below

If the Server/Instance, Database, SQL User or Passcode is different please amend the SET lines.

Then save as C:\Evopos\Backups\EvoposBackup.BAT

The backups are named after the days of the week so Evopos_1 will be Monday, Evopos_2 will be Tuesday etc. The files are overwritten each time so there will always only be the last weeks backup files in there.

You should keep a copy of important backups in a separate location. You should also keep additional backups for Monthly, Quarterly, Yearly etc.

You can add additional commands for copying other important data and also copying to a USB drive which can be rotated and kept off the premises. You could also copy to a shared folder system such as DropBox

The batch file will also update a Log.txt to give you a log of all the backups taken.

Sample text to go in the backup file:

REM -- Ensure the following 6 settings are correct

SET SERVERINSTANCE=(Local)\bbs

SET DATABASE=BBSMain

SET DBUSER=sa

SET DBPASSWORD=bbs1955

SET LOGFILE=C:\Evopos\Backups\log.txt

SET BAKFILE=C:\Evopos\Backups\Evopos

for /f %%a in ('wmic path win32_localtime get dayofweek /format:list ^| findstr "="') do (set %%a)

ECHO OFF

CLS

ECHO Backing up: %DATABASE% on: %SERVERINSTANCE% for Week Day: %dayofweek%

ECHO to: %BAKFILE%_%dayofweek%.BAK - Please wait...

ECHO ========== >> %LOGFILE%

DATE /T >> %LOGFILE%

TIME /T >> %LOGFILE%

ECHO Backing up: %DATABASE% on: %SERVERINSTANCE% for Week Day: %dayofweek% >> %LOGFILE%

ECHO To: %BAKFILE%_%dayofweek%.BAK >> %LOGFILE%

SQLCMD -U %DBUSER% -P %DBPASSWORD% -S %SERVERINSTANCE% -Q "BACKUP DATABASE %DATABASE% TO DISK = '%BAKFILE%_%dayofweek%.bak' WITH FORMAT, STATS" >> %LOGFILE%

REM -- Edit and Un-Rem the following line to Backup other important files

REM XCOPY C:\DOCS\*.* F: /S

REM -- Edit and Un-Rem the following line to copy to a USB Drive or Dropbox folder

REM COPY %BAKFILE%_%dayofweek%.bak F:

ECHO Backup Completed >> %LOGFILE%

ECHO Backup Completed