Database Configuration
Directories
In OperaJM the database directories are:
-
Archives
-
Users
-
Clients
-
Jobs
-
Inventory
Related to this 5 directories there is the flag Network, a true/false field which will activate the concurrency control with the other peers using the mentioned file locking system. When Network is active the Network directory field is required
- Network directory - Directory which contains a Opera table named OPERACFG with the common configuration to be shared with the other peers. There are more than 300 configurations key to define the Opera parameters and behaviors like houly rates, cutting optiomization methods, barcode formats etc.
Then there are other paths related to post-processors. Post rocessors are used by Opera to import/export data from/to other softwares and machines.
-
CNdrivers - Is the path wher the machine post-processors are saved. There are two CNdrivers fields so Opera will serach for a specific post-processor in the first and if is not found it will perform the search on the second path.
-
Hardware drivers - Is the directory where are placed the hardware post-processor. An hardware post-procssor is a post-processor used by opera to connect to hardware manufacturers hardware configuration engines like MaicoWin, AGB3000NG and Excel pool files.
-
Export Filters - Contains files, scripts and resources used by Opera to exchange data with external software like NetSuite, SAGE, QuikBook, AS400, SAP and in house custom software.
-
External Reports - Opera has an integrated connction with Jasper Reports and in this directory are places .jrxml documents and other resources like images, scripts and translation files.
Other directories are:
-
Pictures - On this path the user can save files hich will be included on the Opera backup. When an image path is required in OperaJM the user can refer this image file using a + as a prefix which will be replced by the directory Pictures. Ex. Pictures directory is
C:\OPERA\IMGso+logo.svgwill be expanded onC:\OPERA\IMG\logo.svg. -
Log - If specified, Opera saveson this directory text log files with the journal containing the activities of the user like opening and closing Opera and record creation and modifications. It's very useful to extract statistics.
-
Output - If specified, every print from the software will be performed through a PDF file which will be saved on this Output directory.
-
Projects - A project in Opera is a collection of directories which can be saved and retrieved. So you can save different databases on different paths and recall it form a project selection. The Projects directory will contains a Opera archive named OPERAPRJ.
-
Update - Is the directory where Opera look at startup to check if an update is available. If multiple workstations point to this directory, when an update is placed there, will install it keeping the peers automatically to the same version.
In the Opera installation directory there is a OPERADB.CFG file which contains the directory configuration for both database, postprocessors and other files. Example of OPERADB.CFG file content:ini
[Opera]
PathArch=G:\OPERA\Archives
PathOperatori=G:\OPERA\Users
PathClienti=G:\OPERA\Clients
PathCommesse=G:\OPERA\Jobs
PathContab=G:\OPERA\Inventory
PathReports=
PathProgetti=M:\OPERA\PROJECTS
PathImmagini=G:\OPERA\IMG
PathLogFile=
PathCnDrivers=cndrivers
PathCnDrivers2=
PathHardwareDrivers=hardwaredrivers
PathFED=G:\OPERA\fed
PathExternalReports=G:\OPERA\externalreports
PathExternalComponents=M:\OPERA\components
Rete=Yes
PathRete=G:\OPERA
PathSetup=G:\OPERA\downloads
Projects
In a typical installation the user creates three projects:
-
Live project - containg the live data with the real jobs
-
Dev project - is a copy of the live database to where create new product configurations to be tested before to be copied back to the Live database. To copy data from a project to another from Opera create a .IOZ file of a product in Dev then switch to the Live project and then drag the file on the Opera icon (or launch OperaJM putting the file as parameter. Ex. run
C:\OPERA\wopera.exe G:\typology003.IOZ) -
Test project - a playground for testing and experimentation
Installation scenarios
Scenario "A" - On premises on workstations with no database sharing
The Opera application and the database files stay on the workstation local disk. In this case you can disable the Network flag on the database configuration disabling all the locking mechanism. This is the fastest deployment method. Opera need a green USB dongle to be plugged in order to work.
Scenario "B" - On premises on workstations with a file server
The database files stays on a server which share and expose the directories where the files of the tables are. The Opera application is installed in the workstations and through the LAN is able to point the configuration of Opera to the tables directories. The OS user need to have read/write rights on the shared folder. Every workstation where Opera is installed need a green USB dongle. This is the most common scenario. Best practice is to create a Opera group of users at the OS level and assign the rights on the delicate Opera database directories only to that group. The database access speed depends on the network latency between the workstation and the server. As the Windows file sharing uses Samba and Samba is very sensitive to network latency, working from remote having the application in local and the database in remote connectec through VPN means that Opera will be very slow to access the database. Opera keep a deep caching system to mitigate this limit but opening the first time and modifying the records can be very slow.
Scenario "C" - On premises with application and database on the server
Both Opera application and the database run on the same machine (the Opera server). In this case, as application and data are on the same machine, there is no network overhead and is much more faster. Users run Opera using Remote desktop or Remote app functionalities. In this case a red USB dongle is needed as the red USB dongle can let more than an instance of the software to run on the same machine. The number of concurrent instances is wrote on the USB dongle memory and can be any number.
Scenario "D" - ### Cloud installation
It's identical to the scenario "C" but the Windows VPS server is on the cloud and no physical access to the machine is possible. In this case a software certificate license is issued instead of a red USB dongle and the certificate will contains the number of the maximum concurrent instances. The certifcate is linked to the public IP v4 address of the server so the server should have a static public IP v4 address.
Scenario "E" - Hybrid installation
It's a mix of scenario "B" and "C". The database directories on the server are networs shared and accessible. Some user uses the application installed on the server using Remote desktop or Remote app while some other has Opera installed on his own workstation pointing to the shared databse folders on the server. This because, as Opera can communicate with other application like AutoCAD or Office, sometimes an installation of this big software is not desired on the server side so in case of need the workstation instance of Opera on the workstation remediate to this case.
Database backup
As the database data is stored on files a copy of all database files .DAT and .LOG is a valid consistent comprehensive backup. However Opera applications have an integrate backup system usable from GUI and operac.
Methods
There are 3 integrated update methods:
-
OZ file - Copies the directories of the database on a .OZ file creating an indipendent filesystem. So all the tables are stored on the .OZ file under predefined sub-folders. Each table has his own predefined folder name, indipendent from the folder where is physically stored. If the backup is restored on another Opera whith a different directory structure each table file will be consistently restored on the correct path.
-
Subversion - Differential backup based on Apache Subversion. Opera keep a local working copy of the database files and when the backup is performed Opera mirrors the actual database files to the working copy and
committhe working copy to a SVN repository. This method is faster as only modified and new files are moved and saved. The working copy has the same filesystem structure than the one used on the OZ file method. If the repository on the filesystem doesn't exist Opera runsvnadmin createandcheckoutthe working copy before to backup. -
Restic - Incremental backup based on Restic. Opera keep a local working copy of the database files and when the backup is performed Opera mirrors the actual database files to the working copy and
backupthe working copy to a restic repository. This method the fastest, only modified and new files are moved and saved and exploit the restic performances. The working copy has the same filesystem structure than the one used on the OZ file method. If the repository on the filesystem doesn't exist Opera runrestic initcreate the working copy before to backup.
OperaJM and operac.exe performs hot backups. They lock each table just before to copy it and than unlock. Backup performed by OperaJM an operac.exe are safe even when other users are currently on-line. The lock is at the table level not at the database level because a backup can take several minutes and we don't want to put on hold for minutes all the connected users. For that reason it can happen (but is high unlikly) that the referential integrity of some table is broken but Opera will fix automatically.
If you decide to backup the database directly copyint the files make sure that no user is using the database.
Locations
A backup in Opera can be made on 3 different locations:
-
Local - OperaJM automatically save the backup data on a
BACKUPfolder under the installation directory. Depending on the method it will be stored in: -
OZ file - The .OZ files are stored directly on the
BACKUPdirectory -
Subversion - The working copy is stored on
BACKUP\SUBVERSION\[base PATH]-(paths hash)\sourcewhile the repository is inBACKUP\SUBVERSION\[database path and path hash]\repository -
Restic - The working copy is stored on
BACKUP\RESTIC\[base PATH]-(paths hash)\sourcewhile the repository is inBACKUP\RESTIC\[database path and path hash]\repository -
Extern - The user can specify a bacup path, usually a NAS or a Server. The directory structure is similar to the one of the Local location.
-
Cloud - Only for Subversion and Restic, the user can specify a URL of the repository system.
-
For Subversion the URL is in the format of https://svnserver/svn/repository_name. The working copy of will be stored in
CLOUD_BACKUP\SUBVERSION\CoudBackupFolder. -
For Restic the URL is in the format of rest://resticserver/repository_name. The working copy of will be stored in
CLOUD_BACKUP\RESTIC\CoudBackupFolder.
OZ file naming
The .OZ file name if build in the following format: yymmdd_[base PATH]-(paths hash).OZ
Is a project is used, the project name is concatenated to the filename of the .OZ file in case of OZ file backup method.
Cloud backup
For the Cloud backup, Opera Company can provide both Subversion and Restic repositories to the his clients on his own cloud servers and can use it to access a copy of the client database for support reasons.
For Subversion and Restic, when using different databases, you must set a different Opera variable (table OPERAVOP) named CloudBackupFolder. The default value of this variable on a new database is default. this to avoid that the Differential/Incremental backup diff on completely different data.
Unique path identifier
On filenames and direcoty names Opera uses a hash value of the different archive directories (Archives, Job, etc. etc.) in order to create a unique name for each differnt database. This hash value is the (paths hash) used in the examples above.