Installation, Backup and Restore · 3/5/2016 · FDS Installation, Backup and Restore How to allow...
Transcript of Installation, Backup and Restore · 3/5/2016 · FDS Installation, Backup and Restore How to allow...
1
1 | P a g e
FDS Installation, Backup and Restore How to allow user’s computers to access the Fullwell Data System (“FDS”) and other basic data management
operations such as backup and restoring data.
Table of Contents
Adding a new computer on the office Network .............................................................................................................. 1 The sections of this process are shown visually in the images below. ............................................................................. 2 Backup and Restore for Computers on the Factory Network ........................................................................................... 4 Setting up and Managing “Jobs” on the database using EDB Manager ........................................................................... 4
The Server’s “Backup” Job ............................................................................................................................................ 5
Restoring the database from a backup ............................................................................................................................. 6 Practical Steps in Restoring a Database from Backup .................................................................................................. 6
Steps in database restoration: ...................................................................................................................................... 7
Alternative SQL Restore statement using “Tables” clause ........................................................................................... 7
Installation on a Tablet Computer ................................................................................................................................... 8 Introduction to Tablet-users ............................................................................................................................................. 8 Adding a New Tablet Computer ........................................................................................................................................ 9
Visual Guide to Adding a New Tablet Computer ........................................................................................................ 10
Notes ........................................................................................................................................................................... 10
Backup and Restore on a Tablet Computer .................................................................................................................... 10 FDS System Files and Components ................................................................................................................................ 11 System Folders and Files ................................................................................................................................................. 11 The SysMgt Utility ........................................................................................................................................................... 13 Disaster Recovery ........................................................................................................................................................... 14 Precautionary Steps being ready to recover from disaster: ........................................................................................... 14
Create and maintain a Removable Recovery Disk to ensure there is always an installation file-set and recent
Backup file available.................................................................................................................................................... 14
Resetting operation of the EDBSRVR after Windows Update .................................................................................... 15
Full Recovery if the Server is damaged or stolen ............................................................................................................ 16 Recovery including reapplication of applied UPDATE files ......................................................................................... 17
Full Recovery when the recovery disk is old ............................................................................................................... 17
Adding a new computer on the office Network In the case of a network-user the FDS is a “zero install”, no files need to be copied to the network-user’s computer.
The network-user can run the FDS executable programme from its folder on the Server. Running it will launch an
instance of the programme on the network-users computer. For convenience it is suggested that a short-cut to the
server file is added to the network-user’s desktop, so they can launch the programme simply by clicking on this
short-cut.
An advantage of this mechanism of operation is that upgrading and updating the system is extremely simple. Just
replacing the executable programme stored on the server with a new version automatically means that all users will
run the new version as soon as they restart the programme.
2
2 | P a g e
The FDS has 3 system-settings which must be set on each network-users computer. These set the Database Name,
Main Database Folder, and Local IP of the programme. Without these the system will not run. This is the only real
“installation step”, and it has been added to ensure that “guest-users” (or hackers!) joining the network cannot
easily open the FDS.
The 3 system-settings are set by running the SysMgt executable programme, as detailed below:
Ensure that the new computer is connected to the network via either a LAN Ethernet cable or via wifi.
Open Windows Explorer on the new computer and navigate to the Server “SerendiSys” folder
“\\Server\SerendiSys\ExecFiles”.
In this folder double-click on the “SysMgt.exe”.
In the window that appears enter the Local IP address and Main Database Folder used on all computers on
the network.
These is usually:
Database Name: “Serendipalm” (or the name of your database).
Main Database Folder: \\Server\SerendiSys\Database.
Local IP: 192.168.0.254.
However this setup may change. Check the settings from another computer by running SysMgt and looking
at the saved values shown there if you are not sure of the values on your system.
Click on “Save Settings” and close the SysMgt.exe.
Now create a short-cut to the main Executable file:
Right-click on the “Serendiplam.exe” in the Server “SerendiSys” folder “\\Server\SerendiSys\ExecFiles”. In
the list that appears select “Send to” and then “Desktop (create shortcut)”.
The user can now run the programme at anytime by double-clicking on the desktop icon.
The sections of this process are shown visually in the images below.
Windows Explorer, open on the Server with the “ExeFiles” folder open.
SysMgt.exe: Shown in the Windows Explorer below Serendipalm.exe in the image on the left, and shown running in the image above. Fill in the “Database Name”, “Main Programme Folder” and “Local IP” fields with values required for your system.
3
3 | P a g e
SysMgt.exe with values completed. The steps in the process of creating a desktop short-cut are shown on the right.
1. Right click on “Serendipalm.exe” 2. Click on “Send to” 3. Click on “Desktop (create shortcut)”
Note that you may also add the shortcut to the “Start” menu or “Taskbar”
Once you have created a short-cut to the Server copy of the FDS executable on the network-users desktop, start-menu or task-bar it will run from the Server whenever the user clicks the short-cut icon. On some Windows installation the warning file shown on the left may appear as the programme is being run over the network. Don’t worry, this is normal, click “run” to continue.
Possible Issues and Trouble-Shooting: Once the FDS is running users will see data displayed on the screens. It is possible that Dates, Currencies and other values may display with formats the user is not happy with. The FDS uses the “Windows Locale” settings for all Date, Currency and other display settings. So the FDS Administrator may wish to alter these settings on the user’s computer so the display is as the user wishes. Important Note: The FDS uses the user’s computers date-and-time settings to log the dates and times of a user’s activities in the FDS. If a user’s computer date-and-time are set wrongly these values will be wrongly saved in the database.
4
4 | P a g e
The image on the left shows the “Sharing Options” for Windows. The exact layout of this screen varies in different Windows versions. It is important that on the computer used as the FDS server, “network sharing” is turned on for the folder containing the FDS “Report Template” files (the “FR3” files which are used when printing reports in the FDS). For this to work the “Public Folder Sharing” option should be switched to: “Turn on sharing …” and the “Reports” folder on the server must be edited so that it is a “Public” folder. If you do not know how to do this please check the microsoft help on on-line, as it varies between different versions of Windows.
Backup and Restore for Computers on the Factory Network All data entered by users on the factory network is shared and stored in the main database.
General users do not have to do anything to backup or restore this data. The process is automated by the database
itself, and safe backup files are stored on the server.
For extra safety the System Administrator should make regular copies of these backup files, in case the main server
computer itself is damaged or stolen. The database can be programmed to make these copies itself via a regular
“Job”, including copying backup files to stores on the cloud.
A simple recommendation is that a regular job should create a backup file which is stored in something like a
“DropBox” (a cloud-based file-sharing system). This backup file is then distributed by DropBox to any subscribing
users, meaning that the system can be restored from any one of them.
DropBox is a free Utility programme which can be downloaded and installed. It is not part of the FDS.
Setting up and Managing “Jobs” on the database using EDB Manager As part of the installation process Fullwell staff will set up systems for your database. However we will also leave
tools which you can use to change and extend the database, particularly operations of “Functions”, “Procedures”
and “Jobs”, which can be run automatically by the server at times chosen by users.
A simple useful Job is to regularly backup the database, and also to undertake “Pruning”, i.e. the tidying and
cleaning-up of excess files which may have been created by the database and may no longer be needed.
To undertake this work, the DB Administrator will need to run the EDB Manager programme, shown below.
5
5 | P a g e
More details on use of the EDB manager are included in later sections of the help files
The Server’s “Backup” Job In the example above it can be seen that on the main Server a database “Job” has been created. The details of the
Job can be seen in the SQL Statement in the right hand side of above image.
The SQL Script shows that the “RegularBackupAndPruning” Job runs on Monday, Wednesday and Friday between
07:16am and 18:16pm. This means if the Server is switched on at any time after 07:16am the Job will immediately
run.
The Job accesses the Serendipalm database, calls runs a procedure called “DeleteOldFiles”, then a second procedure
“SimpleBackUp”.
The “DeleteOldFiles” procedure checks the number of backups which are saved, the first 7 backup files are never
deleted, but beyond these 7 “saved” backups older backups are deleted.
This procedure ensures that there is always a good set of backup files but that disk space is not wasted with large
numbers of backup files.
The “SimpleBackUp” procedure calls the following SQL:
This SQL is fairly simple. Calling the SimpleBackup procedure commands the database to immediately “BACKUP
DATABASE Serendipalm” and then “BACKUP DATABASE SystemDB”. The backup files are given names based on the
current date, and saved to the “Backup” store.
6
6 | P a g e
The above image shows actual backup files stored on the computer hard-drive, viewed through the Windows
Explorer.
1. The location of the “Backup” store.
2. A backup file for the “FMSys” FDS database.
3. A backup file for the “SystemDB” database.
Note that the database administrator can edit and change database Jobs. If it is desired that the timing or frequency
of the “RegularBackup” Job should be changed this can easily be done from the EDB Manager.
Details of how to make changes to Jobs and other aspects of database management are detailed in later parts of the
help files.
Restoring the database from a backup FDS databases very rarely fail. It should almost never be necessary to restore a full database. However for safety the
capability to do this is built into the system, but it is not automated in any way as it should only be done as a last
resort.
If a database is fully restored from a backup file all data added to the database after the backup file was created is
lost.
Restoring a database is an act of last resort and should only be done in very extremely situations. It is recommended
that DB Admin consult with FDS personnel prior to restoring a database to ensure that the process is done well.
It is possible to partially restore an FDS database. For example if only one or two tables of the database are
corrupted then the restore command may restore only these tables leaving others unchanged. This process can be
useful, for example if a clumsy DB Admin has accidentally deleted files from one database-table. However restoring
just part of the database also has risks and issues, particularly if the table being restored is linked to any other tables
in the database, as the restored table may lack records referenced in these linked tables, causing errors when the
restoration occurs.
Practical Steps in Restoring a Database from Backup Open EDB Manager.
Navigate to your database Session, and open it. Do not open your database, as this will block the restoration
step.
Open the “Stores” heading in the EDB Manager, and review available backup files. Find the most recent
backup file.
7
7 | P a g e
Open a new SQL Window.
Write the following SQL in the new SQL Window RESTORE Database “Serendipalm”
FROM <filename> IN STORE “Backup”
INCLUDE CATALOG
<tables>
Add the file-name for the backup file (without the file extension) in place of <filename>, and if you only wish
to restore one or two tables from the backup file list these (separated by commas) in place of <tables>. If
you wish to restore the whole database delete the text <tables>.
Once the SQL is correct click on the “Execute” button.
The image below shows the EDB Manager ready to restore a database
Steps in database restoration: 1. Serendipalm Session active.
2. Backup file “AdamUpdate” found in “Backup” store.
3. Click “New SQL Statement” button.
4. Write RESTORE DATABASE script.
5. Click “Execute” button.
Alternative SQL Restore statement using “Tables” clause The image below shows a SQL statement which would restore the database from a Backup file, but only restore data
from 2 tables: “Deliveries” and “Purchases”.
8
8 | P a g e
This Syntax of the SQL Script allows partial restoration of the data in the database.
Installation on a Tablet Computer
Introduction to Tablet-users The process of adding a new Tablet Computer is more complex than adding a Network-user, as each tablet must
store a copy of the database for use when the Tablet is in the field.
In fact all Tablet-users add and edit data in their own copy of the database, not to the main Server database. The FDS
then manages a system of “Updates” which copy changes a Tablet-user has made to the database onto the Server,
and copy back changes made by other users onto the Tablet-user’s computer. This process has the technical name
“Replication”.
Replication is the process which allows accurate merging of data between different users so that additions, edits and
deletion of data by any number of distinct users each with their own copy of the database is possible.
Replication has one critical feature which is important for a DB Admin of FDS to understand. This is the idea of a
“UID” or “Unique Identifier” / “Unique ID” for every record in the database. Every table in the FDS database has an
“ID” column as its first data-field. The FDS sets this ID when a new record is added to any table. This Unique ID is
used in all update and replication processes to ensure that the correct data is updated.
Each instance of the FDS must have its own UID-range. This is set and stored in the SystemDB database, in a small
data-table called “UIDGenerator.” The image below shows this system table open in EDB manager.
In the case shown above a user has been allocated the UID range starting form 13,000,000 (13 million) and running
up to 14,000,000. The above user has added 2,670 records to the database, giving them a “current” UID of
13,002,670.
The UID concept is useful as it means that, if each Tablet-users UID range is known the DB Admin can see at a glance
which Tablet-user has added each record.
During installation of a new Tablet-user the DB Admin must allocate them a new UID range, and this must be unique
to this new user. It is suggested that each user be allocated a range of 1 million records, and that the Server be
allocated a range of 10 million records, giving UIDs as follows:
9
9 | P a g e
Computer Minimum UID Maximum UID
Server 1 10,000,000
Tablet 1 11,000,001 12,000,000
Tablet 2 12,000,001 13,000,000
Tablet 3 13,000,001 14,000,000
Etc. … …
Using the above scheme, if tablets are clearly marked with their numbers it is immediately obvious which user has
which tablet and which tablet-user is responsible for each record added to the database.
Very few users add more than 100,000 records to the database, so this scheme is usually adequate with no further
changes. However if any user did add 1,000,000 records the DB Admin would simply update their UIDGenerator
table to give that user a new Minimum and Maximum UID, and their work could continue.
Adding a New Tablet Computer All tablet users need a full set of the files which are present on the Server:
Executable files: EDBSrvr, SysMgt, EDB Manager and Serendipalm.exe
The special file “ProcRunner.exe” which manages the Replication process.
All Database files.
All Report Template Files (“FR3” files, described in other parts of the help manual).
Folders on the hard-disk for Stores required by Replication.
Copying these files onto the tablet is managed by the SysMgt programme, through its second “Tab-sheet”, as shown
in the images below.
Once the necessary files are copied onto the Tablet-user’s machine the system settings for:
1. Database Name: “Serendipalm” (or the name of your database).
2. Main Database Folder: C:\SerendiSys\Database.
3. Local IP: 127.0.0.1
Should be added using the SysMgt programme, and a short-cut for the SerendiSys executable file should also be
added to the Tablet-user’s desktop as for the Network-user.
Next the “Setup Replication” tab of the SysMgt programme should be reviewed
1. Click on the “Copy Files” buttons to copy all needed files from the Server to the Tablet.
2. Enter a new User ID to give the user their own distinct range of IDs for records they add and delete.
Finally, the EDBSrvr programme should be copied onto the Tablet-user’s computer set running and its configuration
folder set to the folder for the FDS database. The EDBSrvr programme should be added to Window’s list of
programmes to launch at Startup, to ensure the database-engine is always running so users can start the FDS
programme.
The above steps are complex, but they are managed well by the SysMgt programme, so the DB Admin does not have
to take too many steps themselves.
10
10 | P a g e
Visual Guide to Adding a New Tablet Computer
SysMgt programme with settings needed for Tablet-user, as per all other installations. Note for the Tablet-user the “local” values for the Main Programme Folder and Local IP have been added.
Second “tab” of SysMgt programme, showing Buttons to click. In the “NewUser UID” field a number should be added to set the UID range for this user. If the last Tablet-user had an UID of 17,000,000 then this field should be filled in with the value 18,000,000.
Notes The SysMgt programme can also be used to update the users machine. If a new version of the Serendipalm.exe is
created you can click the “Copy Exe file from Server” button to get the new version, or if Reports are upadated you
can click the “Copy Down Reports from Server” button.
Please keep track of User Names and UIDs on a spread-sheet or document somewhere, so we can easily know
which ones have been used.
Backup and Restore on a Tablet Computer A Backup Job, similar to the one running on the main server computer is also set up for every Tablet-user by the
SysMgt installation process. This creates backup files which can be used in exactly the same way as on the server
computer.
Issues with restoration of data on Tablets are similar to those on Servers. Restoring from a saved backup will of
course only restore data entered up to the point when the backup file was created.
Also, it is possible to restore a tablet using a Backup file from the server. In such a case all data added on the tablet
since its latest update to the server would be lost, but the Tablet-user would be able to immediately re-start use of
the system.
If a Backup File from the server is used to restore a Tablet, a slightly different SQL Script is required. The two options
are shown visually below.
11
11 | P a g e
Running the script shown above in EDB Manager would successfully restore the database from a Tablet backup file.
If a Backup file from the Server is used the above SQL Syntax should be used. It is the same, but adds the statement “RESET PUBLISHED TABLES”. This syntax needs to be added to ensure that Replication operates correctly from the tablet after the restore process is completed.
FDS System Files and Components The Fullwell Data System (“FDS”) uses a selection of files on any computer. This documents clarifies the details of the
installation for the Administrator.
The SysMgt Utility semi-automates the process of copying the necessary files onto a new computer. This document
lays out the manual steps involved in this installation, and the files and folders that result on a Tablet or Server
computer so the user can fully understand it for purposes of problem-solving and fixing the system.
System Folders and Files
The FDS is stored in 4 main folders. These are normally copied onto the Tablet or Server computer within a “root” folder with the name of your company, i.e. “C:\Serendipalm.” The detailed contents and purpose of the different folders are detailed below.
12
12 | P a g e
The Database Folder contains the “EDBConfig” data files which define the database, and “Data”, “Stores” and “SystemDB” folders. The contents of the Data folder is described in more detail below. The “Stores” folder is used to hold “Backup” and “Update” files used by the system. The “SystemDB” folder holds a small set of “system” files.
The ExeFiles folder contains the main programme and utility files of the system, in this case you can see a main programme “NdaliSys.exe”, which actually opens the user interface to the system, the “SysMgt” programme which is described in more detail below, and the two EDB utilities “EDBMgr” and “EDBSrvr”, which are also described below.
The Reports folder contains Report-template files. These files have the file-extension “FR3” which refers to their file-format “Fast-Report-3” (Please refer to www.fast-report.com for more detail on this file format if needed) which is a general-purpose XML report-definition file-format. These files can be edited by the user, and are used when printed output or PDF files are created by the system. More detail on how to use FR3 files and how to edit reports are detailed in later sections of the Help manual.
13
13 | P a g e
The Help folder contains a set of Help files, which give users and introduction to the operation of the system, and provide guidance on how to use the system. All users should review these PDF files to gain a better understanding of the operation of the system.
The “Data” folder of the system contains the actual data-files for the database. The general user does not need to access these files at all. However it can be useful to understand what is present in this folder. In the diagram the “FarmInspections” files have been highlighted. Each data-table in the database is stored as several files: An “EDBTbl” file, holds the Data. An “EDBIdx” file, which holds Indexes. An “EDBPbl” file, which holds Published data. An “EDBBlb” file, which holds Blob data. “Blob” data is large-format data elements like photos, or long sections of text. “Published” data is used to generate “Updates” to share data between databases. The “Updates” process is explained in a separate section of the manual.
The SysMgt Utility
The SysMgt programme is a small utility which is used to set Configuration-settings for every computer using the FDS. It is usually stored in the “ExeFiles” folder of the system, as shown in the image on the left.
14
14 | P a g e
Double-clicking on the SysMgt.exe will open the Window shown on the left. For the FDS to run the “Database Name”, “Main Programme Folder” and “Local IP” must be set correctly. Typical settings for a computer are shown on the left. Once these have been set, click the “Save Settings” button to store the values in the computer’s “Registry”.
The “Main Program Folder” will always be the folder containing the “EDBConfig” file.
In the example above, the Main Program Folder and IP address have been set to the folders for the network-server, which is the computer running the EDBSrvr.
The “Local IP” will be the IP address of the computer running the EDBSrvr.
For a TABLET the “Local IP” will always be
127.0.0.1: This is a computers “own” address.
For a Networked computer, the “Local IP”
should be the Address of their network’s Server
Computer.
When the main Application of the FDS starts, it will use the data in the Registry to set itself and to determine where it looks for data and report-files.
The SysMgt Utility stores the data for the FDS in the computers “Registry.” This is a special store managed by the Windows Operating System. It can be checked by running the Windows Utility “RegEdit.exe”. In the Registry the FDS creates an entry under “HKEY_CURRENT_USER\ADAMBRETT\DATA”. This entry contains the data entered in the SysMgt utility. Some anti-virus computers or computer set-ups block writing data to the Registry. This may block operation of the FDS.
Disaster Recovery
Precautionary Steps being ready to recover from disaster:
Create and maintain a Removable Recovery Disk to ensure there is always an installation file-set and recent Backup file available
The system creates a backup file of the database whenever the “Regular Backup” JOB is run. It will keep roughly 10
backup files, so there are always copies of the database for a substantial prior period of work. If no changes are
made to the database in a day then it will not create a backup file. If the server is not switched on it cannot make a
backup file, so you should try to make sure that the server is kept on if it is in use to give it a chance to create the
necessary files.
If cloud operation is in place then the backup file will be copied to the cloud and kept safe there. However, if cloud
operation is not in place it becomes necessary to manually save backup files to a new location, the Server is
15
15 | P a g e
damaged or stolen. As well as the main backup file (which holds a full copy of the database) the other files in the
"C:\<YourCompanyName>" folder are also needed, so these should always be kept on a removable disk separate
from the Server.
To save Backup files outside of the Server simply connect a removable disk to the server, and copy all the files in the
“C:\<YourCompanyName>“ folder onto the removable disk. This removable disk is then your “backup-backup” and
can be used when there is a serious problem. A robust removable hard-disk should be bought for this purpose, and
kept to this purpose. This disk should not be used by others, or used to hold other files as this may spread viruses to
the server.
The key files required by the Server are the EDBSRVR.exe (to allow other users to access the database) copies of
SysMgt.exe and <YourCompanyName>.exe, the database files (in the “Database” folder) and report files (in the
“Reports” folder).
For more information about the files used by the system please see the “Actual File Components of the System”
help document.
Resetting operation of the EDBSRVR after Windows Update
After certain types of Windows Update you may encounter problems with the server. Substantial changes to
Windows should not remove the database files, but may stop the EDBSRVR from running automatically at start up,
or may change other system settings. When this happens previous user-settings are deleted, and must be recreated.
First Step: Resetting EDBSRVR.exe to run at start-up:
1. Switch on the Server computer, if necessary connect a screen and keyboard to it so that you can run it as a normal computer.
2. Find the folder which contains the data installation, (on your system this should be "C:\<YourCompanyName>").
3. Within this folder find the sub-folder “\Database”, in this folder there should be a program “edbsrvr.exe”, right click on this program and select “create shortcut”.
4. Move this shortcut to the “Startup” folder on the “All Programmes” section of the start menu. 5. Double click on this short cut to restart the server.
Second Step: Resetting the configuration settings of the EDBSRVR.exe
1. Move the mouse to the bottom right of the screen. Click on the small arrow here which opens the window showing utilities that are running on the machine.
2. In this window you should see the Orange “E” of the EDBSRVR, together with a green “go” or red “stopped” icon.
3. Right click on the orange “E” and select Restore. 4. A window will appear. In the top right there is a “Tasks” section in which a link to “Stop Server” or
“Restart Server” is present. 5. Click “Stop Server”, a second Task “Edit Server Options” will appear. Click on this. A new window of
settings for the EDBSRVR will open. 6. Click on the “Configuration File” tab in the newly opened window. Where it says “File Folder”
ensure that the entry is “C:\<YourCompanyName>"\Database”. 7. On the main page of the configuration settings check that the “Character Set” option is set to
“ANSI” not “UNICODE”. 8. Close the window. 9. Click on the “Start Server” Task.
16
16 | P a g e
Third Step: Reset IP Address of the machine
1. Open “Network and Sharing Centre”. Click on “Wifi Network Connection (<name of wifi network>)”. 2. In the window which appears click on “properties”. In this window, click on “Internet Protocol
Version 4”, then click on the “properties” button. 3. In the window which appears, set the fields as follows:
Use the following IP Address: Tick. IP address: 192.168.1.254. Subnet Mask: 255.255.255.0 Default Gateway: 192.168.1.1 Preferred DNS server: 192.168.1.1 Alternative DNS server: 192.168.1.2
4. You may now need to restart the server for these settings to be fully applied.
5. NOTE: In the settings above it is assumed that the wifi network is using the standard “sub-net” of 192.168. It is possible that a different subnet is being used. (10.10 is sometimes used). If this is the case amend the IP Addresses in step 3., above so that they start with the relevant subnet, rather than 192.168
After these 3 steps are taken the database should be accessible from any computer connected to the wifi network,
provided that it has been set to look for the server at the correct IP Address (192.168.1.254 in the example above).
To check this, run the SysMgt.exe on the computer and check the IP Address entered in the “Local IP” field.
Full Recovery if the Server is damaged or stolen In some cases the whole server may be damaged or destroyed. In these cases it is necessary to rebuild the server from scratch. This is not so complicated, but does require many steps, which must be made carefully, in order.
1. In Network Settings ensure that the machine is set to a fixed IP Address of 192.168.1.254 2. Copy the files from the Removable Recovery Disk into a folder “C:\<YourCompanyName>“on the
new server. 3. Run through the steps to Reset Operation of the EDBSRVR above.
4. Restore the database using the most recent backup file that is available. This file might be on the Cloud, or on another users Tablet computer (if your system includes a “Replication” process).
Note that when this happens there will probably be some “gap” in data entry. All data added to the system since the most recent backup will be lost. If a backup was created on Wednesday night, then the server is stolen on Saturday with no new backup being created several days data will be gone.
A more recent version of the database may well have been backed up to the cloud. In that case, open EDBMgr and check the “CloudBackup” store for EDBBkp files (the database back-up files). If any of these is newer than the one on your recovery disk use it to restore the database.
To do this simply run the following script in the EDBMgr, with <YourCompanyName> session selected, but with <YourCompanyName> database closed.
Database Restoration Script:
COPY FILE “<BackupFilename>” IN STORE CloudBackup
TO “<BackupFilename>” IN STORE Backup!
RESTORE Database “<YourCompanyName>” FROM “<BackupFilename>”
IN STORE Backup INCLUDE Catalog RESET PUBLISHED TABLES !
UNPUBLISH DATABASE “<YourCompanyName>”!
PUBLISH DATABASE “<YourCompanyName>”
17
17 | P a g e
Recovery including reapplication of applied UPDATE files
If you use a system which includes Replication (where remote users have their own copies of the database, and return “updates” to it from time-to-time) it is possible that your backup might not include certain updates from these remote users.
In such a case it is necessary to rename UPDATE files for any users who have used the system since Wednesday, and rerun the data-update process.
To do this:
1. On the machine of every remote user who has used the system, find the folder “C:\<YourCompanyName>\Upload” it will contain all the update files for this user. The update files which have been uploaded will have file-names which end “OLDUpd”. The files which have not been uploaded will have file-names which end “EDBBpd”. To reapply lost updates you must rename all the files which were created AFTER the date of the recovery disk files so that they end “.EDBUpd” not “.OLDUpd”. This will allow older update files to be reapplied to the new copy of the database.
2. Open EDBMgr on the users machine, open the system, and run Updates from the “Edit, Run Updates Now” menu. All the updates you have renamed will be pushed back onto the server.
NOTE: These “OLD” files are not kept on the user machines forever, there is an automatic procedure in the database to delete them after a certain time, so they do not use up too much disk space. If Recovery Disks are not created regularly enough then some of these OLD files may have been deleted, and these updates will have been lost. If a cloud connection exists it is always possible to find the latest backup file and use this. If a cloud connection does not exist, data from lost period will have to be manually re-entered.
Full Recovery when the recovery disk is old
Some tasks involve extending the structure of the database. For example when a new user is added to the system a new set of “stores” and new file-update processes are created. Or some new functions or procedures, perhaps even database elements such as fields or tables might have been added. If no recovery disk is made then these files will not be present on the Recovery disk. This may make full recovery extremely difficult.
To avoid these issues:
1. When changes are made to the database always use a database script and save this script to a folder on the Server, and include this folder in any automated backup process.
2. Be sure to make regular copies of the recovery disk.