Introduction
When the day's work with Hansa is done, we advise you to make a back-up. It is a good idea to save a copy of the file and store it in a safe place. It might seem unnecessary to make a back-up every day, but the short time this takes is a good investment for the day something goes wrong with the hard disk.
To back up your data is particularly important when, as in the case of a Hansa database, the financial information of your company is involved. If you should lose all your data, you will find yourself in a very awkward situation, missing all invoices, receipts, reports etc. Make sure you make a back-up each time you have been working with your accounts. Name your copies systematically with dates so that you can easily restore the database, should an accident occur.
If you get a virus on your computer, you must first try to establish the date when your computer was infected. In this case you must restore your data from a back-up created before the infection date. Otherwise you run the obvious risk of re-infecting the computer again.
Hansa's method of back-up is fast and economical. The data is saved as a back-up file that takes up a minimal amount of space, and the back-up files are independent of the program versions. Of course, it is also possible to copy the database file as it appears on your hard disk, but this is not so economical in terms of disk space, and a subsequent restoration may not be successful if the version of your Hansa application has changed since the back-up was made.
! | Use Hansa's built-in back-up feature to guarantee a successful restoration. |
|
To create a back-up, follow these steps:
- Select 'System' from the Modules menu.
- Choose 'Exports' on the File menu or click the [Exports] button in the Master Control panel. The Exports window is shown:

- Select 'Company Text Back-up' (if you wish to back up the data in the database relating to the single Company currently selected) or 'Database Text Back-up' (if you wish to back up the whole database) from the 'Exports' window and click [Run].
Usually the 'Database Text Back-up' option should be used, as this is the only choice that backs up the entire database. You must use it regularly for your safety and peace of mind. Some registers and settings (e.g. the System Usage setting, Mailboxes and Conferences) are stored at database level, not Company level. These will not be exported by the 'Company Text Back-up' option, even if your database only contains a single Company. The 'Company Text Back-up' option is intended for use in the situation where you need to move all the information relating to a specific Company from one database to another.
In a multi-user system, the 'Database Text Back-up' option cannot be used on a client machine. It can only be used on the server machine, when no other user is logged in. First, select 'Quit, Remove Autoserver' from the File menu and restart Hansa. Then, choose the System module using the Modules menu. If it is not convenient to work from the server, use the automatic timed back-up feature.
If the server does not have a graphical interface, you can use the automatic timed back-up feature, or you can create a back-up file by typing into the Terminal:
- ./hansa --backup
This will launch the Hansa server application, which will then create a back-up file and then quit.
- The 'Specify Text Backup' window appears. This offers you 40 characters with which to describe the back-up file that you are about to create. If it becomes necessary to restore from a back-up, this description will be shown in the list of importable files to help you select the correct one.

Enter an appropriate description and click [Run].
- If you have chosen to back up the whole database and you have more than one Company, you will now be asked to log in to any that you have not yet used in this work session. For reasons of security, if you are not able to log in to all Companies, the back-up procedure will be halted.
- Hansa opens a dialogue where you can name and place the export file. Enter the name of the file in the filename area and locate it in the appropriate directory in the usual way. The name of the back-up should include the date the back-up was made, but remember that you can use a maximum of eight characters if you are using Windows NT version 3. Then, click [Save].
It is recommended that the back-up file be stored in a folder or directory named "Backup" which should be in the same folder or directory as the Hansa application. All back-up files in this folder will be shown in a list of importable files if it becomes necessary to restore from a back-up.
A message window informs you about the progress of the export.
When the export is finished, you are brought back to the 'Exports' list. Close it using the close box.
! | Under no circumstances should you edit or change a back-up file with another program. |
|
Text Back-ups
The "text back-up" method of backing up will copy the data in your database to a separate back-up file. You will always be able to recreate your database from such a back-up file, even if you have updated the version of your HansaWorld Enterprise application since making the back-up.
To create a text back-up file, follow these steps:
- Use the [Module] button in the Master Control panel or the Ctrl-0 (zero) (Windows and Linux) or ⌘-0 (Mac OS X) keyboard shortcut to go into the System module.
- Click the [Routines] button in the Master Control panel and then [Exports]. Alternatively, use the Ctrl-E (Windows and Linux) or ⌘-E (Mac OS X) keyboard shortcut. The Exports window is shown:

- Double-click 'Company Text Backup' (if you wish to back up the data in the database relating to the single Company currently selected) or 'Database Text Backup' (if you wish to back up the whole database) from the 'Exports' window.
Usually, you should use the 'Database Text Backup' option, as this is the only choice that backs up the entire database. You must use it regularly for your safety and peace of mind. Some registers and settings (e.g. the Configuration setting, Mailboxes and Conferences) are stored at database level, not Company level. These will not be exported by the 'Company Text Backup' option, even if your database only contains a single Company. Attachments also will not be exported by the 'Company Text Backup' option. This option is intended for use in the situation where you need to move all the information relating to a specific Company from one database to another.
In a multi-user system, you cannot use the 'Database Text Backup' option on a client machine (it will not be included in the 'Exports' list illustrated in step 2). You can only use it on the server machine, when no other user is logged in and when you access the server database using the GUI application. If it is not convenient to work from the server, use the automatic timed back-up feature from a client.
If you are using the command line server application (Mac OS X or Linux), you can use the automatic timed back-up feature from a client, or you can create a back-up file on the server by typing into the Terminal:
- ./HansaWorld --backup
This will launch the HansaWorld server application, which will then create a back-up file and then quit.
If you are using the service application (Windows), you will need to place the --backup parameter in a "parameters.txt" file before launching the application, as described in the 'Launching the Server with Parameters ' section on the Loading an Existing Database and Company page. When the back-up file is complete, the application will quit (you may need to monitor the log file (named "hansa.log") to see when the application quits). Remove the --backup parameter from the "parameters.txt" file before restarting the application.
- The 'Specify Text Backup' window appears. This offers you 40 characters with which to describe the back-up file that you are about to create. If it becomes necessary to restore from a back-up, this description will be shown in the list of importable files to help you select the correct one.

Enter an appropriate description and click [Run].
- If you have chosen to back up the whole database and you have more than one Company, you will now be asked to log in to any that you have not yet used in this work session. For reasons of security, if you are not able to log in to every Company, the back-up procedure will be halted. After logging in to every Company, return to the 'Specify Text Backup' window illustrated in step 4 to continue the backing-up procedure (the 'Specify Text Backup' window will be hidden behind the Master Control panel).
- A dialogue box will open, allowing you to name and place the export file. Enter the name of the file in the filename area and locate it in the appropriate directory in the usual way. The name of the back-up should include the date the back-up was made. For ease of importing later, it is recommended that you do not include spaces or other non-alphabetic characters in the name of your back-up file, and that you give it a .txt extension. More details are on this page. Then, click [Save].
It is recommended that you save the back-up file in a folder or directory named "Backup" which should be in the folder or directory containing the HansaWorld Enterprise application. All back-up files in this folder will be shown in a list of importable files if it becomes necessary to restore from a back-up.
A message window informs you about the progress of the export.
When the export is finished, you are brought back to the 'Exports' list. Close it using the close box.
! | Under no circumstances should you edit or change a back-up file with another program. |
|
---
In this chapter:
Automatic Timed Back-ups
The importance of establishing a regular routine for backing up cannot be emphasised enough. Because Hansa works - like all financial systems - with a single file database in which all your data about customers, invoices, nominal ledger etc. is stored, if you lose that file, you have lost not just a single document, but all your accounting and customer information.
To make this task easier, Hansa contains a timed back-up feature whereby a database back-up file can be created automatically every day. To specify when the back-up files are to be created, and where they are to be stored, follow the steps outlined below. In multi-user systems, these steps should be carried out on the server machine only.
- Select 'Technics' from the Modules menu. In multi-user systems, this can be done on the server machine, when no other user is logged in. To gain access to the Modules menu, select 'Quit, Remove Autoserver' from the File menu and restart Hansa.
If it is inconvenient to work on the server (e.g. it does not have a graphical interface, or it is in another building), you can work from a client machine. Log in as a Person that has access to the Technics module (controlled using Access Groups).
If 'Technics' is not available on the Modules menu in a single-user system, this will probably be because you have not granted yourself access to the Server module in the System Usage setting.
- Choose 'Settings' from the File menu. Double-click 'Timed Operations'. The following window appears:

- Set the Operation Time (the time when the backup is to take place) to the appropriate time, when it is likely that no-one will be using Hansa. The 24-hour clock should be used, and a colon (:) used as the separator between the hour and the minute. The back-up file will be created at the specified time, even if there are still users logged in to Hansa. However, such users will find the speed of operation to be much reduced while the back-up is being carried out. It is therefore highly recommended that a time is specified that is outside working hours, to minimise such inconvenience.
- Specify the Database Backup Path, which determines where on your hard disk the back-up files are to be saved. If this field is left blank, the back-up files will be saved in the folder containing the Hansa application.
The following examples show the correct syntax for the Database Backup Path. You can use either \ or / as a separator between folder names under Windows, Linux and Mac OS X while you should use : on Mac OS 9. Note that the separator appears as the final character in the path.
It is recommended that you save the back-up file in a folder or directory named "Backup" which should be in the same folder or directory as the Hansa application. All back-up files in this folder will be shown in a list of importable files if it becomes necessary to restore from a back-up. Under Windows XP, Linux and Mac OS X, you can do this using a relative path:
- backup/
Under Mac OS 9, you can only use an absolute path:
- hard disk:hansa:backup:
If you want to store the back-up file somewhere else, use absolute paths with the following syntax:
- Windows
- c:/samplefolder1/samplefolder2/backup/
- Mac OS 9
- hard disk:samplefolder1:samplefolder2:backup:
- Mac OS X
- /samplefolder1/samplefolder2/backup/
Note that if a mistake is made (for example, there is a syntax error or a non-existent folder is specified) there is a risk that the back-up file will not be created.
- Click the [Save] button in the Button Bar to save the back-up specifications.
Once the timed back-up feature has been set up as described above, a new back-up file will be created automatically every day at the same time. It will be given the name "TBYYMMDD.TXT" where "YYMMDD" represents the current date. The file will contain a back-up comment stating that it was created by timed back-up and showing the date and time this occurred.
Remote Back-ups
The
timed back-up feature in Enterprise by HansaWorld means that a database text back-up file will be created automatically every day. The remote back-up feature provides additional security by ensuring an extra copy of each daily back-up file will be stored off-site on a remote server. It is always recommended that you store back-up files on more than one hard disk and in more than one location. While you can use the remote back-ups feature as a tool to help with this, you should of course keep your own copies of your back-up files and not rely solely on the remote server.
The remote back-ups feature is a chargeable cloud service provided by HansaWorld. Please refer to your local HansaWorld representative for information about pricing and for details about registering for the service.
To start using remote back-ups, follow these steps:
- Follow the instructions on the Automatic Timed Back-ups page to set up the timed back-up feature. This is necessary because whenever a back-up file is created using the timed back-up feature, it will be copied automatically to the remote server. Back-up files created using the 'Database Text Backup' option will not be copied to the remote server. In any case, the 'Database Text Backup' option cannot be used from a client machine in a multi-user system.
- Select 'System' using the [Module] button in the Master Control panel or the Ctrl-0 (zero) (Windows and Linux) or ⌘-0 (Mac OS X) keyboard shortcut.
- Click the [Settings] button in the Master Control panel or use the Ctrl-S or ⌘-S keyboard shortcut. Double-click 'Backup Settings'. The following window appears:

- When you register for the remote back-ups service, you will be provided with User, Password, Address and Port information. Enter that information here and check the Remote Backups box.
- Click the [Save] button in the Button Bar to save the back-up specifications.
- In a single-user system, close your Enterprise by HansaWorld database and restart. If you are working on a client in a multi-user system, ignore this step.
- After you have followed the steps above, each time a timed back-up file is created, it will first be saved on your hard disk and then uploaded to the remote server. The Job Status setting in the System module will show you the progress of the upload.
- If you need to retrieve a back-up file from the remote server, you must use a single-user database. You cannot do so from a client in a multi-user system. It is assumed that you need to retrieve the back-up file because your main system has become damaged or lost.
To create a new single-user database, place your Enterprise by HansaWorld application and "hob" folder in a new folder together with the "dbdef.txt" and "default.txt" files and launch the application. When the 'Welcome to HansaWorld' window appears, click the [Single User Database] button and follow the instructions on the Creating a New Database - Single-user page.
- Enter your details in the Backup Settings setting as described in steps 4-6 above.
- Open the Remote Backups setting in the System module. The 'Remote Backups' window will open, listing the back-up files that are on the remote server:

- Click on the most recent back-up file (or the most recent back-up file that you know is undamaged) and click the [Get] button. The back-up file will be downloaded to your computer, to a folder named "Downloads" that will be inside the folder or directory containing your Enterprise by HansaWorld application. You can monitor the progress of the download using the Job Status setting, as mentioned in step 7.
- Please refer to the Restoring from a Back-up page for details about recreating your database from the back-up file.
---
In this chapter:
Go back to:
Backing Up Using Specialist Back-up Software
As described
here, we strongly recommend that Hansa's built-in back-up facilities are used as the main part of your back-up strategy. They are more economical in terms of disk space and are more reliable in that the success of a restoration is guaranteed even if the version of your Hansa application has changed.
However, some users may prefer to rely on specialist back-up software such as Retrospect to produce back-up tapes that can be stored off-site. Such software can sometimes fail to create a back-up file if the files being backed up are still in use. For example, a user may have gone home having forgotten to log off (or having left their machine producing a report) and this may cause the back-up to fail.
To cater for this eventuality, Hansa can be instructed to alter the state of the database so that, as far as the back-up software is concerned, it appears not to be in use. To do this, follow these steps:
- Select 'Technics' from the Modules menu and then choose 'Settings' from the File menu.
- Double-click 'Timed Operations'. The following window appears:

- Set the Database Closing Time to a few minutes before the moment the back-up software is scheduled to start work. The 24-hour clock should be used, and a colon (:) used as the separator between the hour and the minute.
- Set the Database Opening Time to a few minutes after the moment the back-up software is scheduled to finish work.
- If you have specified an Operation Time as well, this should not be between the Database Opening and Closing Times. The database is dormant during this period, so the Operation Time will have no effect.
- Click the [Save] button in the Button Bar to save the changes.
Once these steps have been followed, in the case of the user who has gone home having not logged off, they will return the next morning to find their machine still logged in to Hansa. Despite this, the back-up should have been carried out successfully.
Database Duplication
In some circumstances, it may not be practical to create text back-up files every day using either the
back-up facilities built in HansaWorld Enterprise or
specialist back-up software. If the database is very large and/or 24-hour access is required, it may not be convenient to slow the speed of operation or to prevent users logging in altogether while back-up files are created. In this situation you can use the database duplication feature to create copies of the database file (the "HANSA.HDB" file) automatically.
Remember that you will no longer be able to use an old "HANSA.HDB" file if you have updated the version of your HansaWorld Enterprise application. Therefore, while database duplication can play an important role in your back-up routine, you must still create a text back-up when you are about to update to a new version, and if you want to create an archive copy of your database that you want to be able to read in the future. Updating is described here. You can of course use a script to move the duplicate database to another machine, rename it "HANSA.HDB", start the command line server application and create a text back-up. To create a true back-up, the script should also move the other contents of the folder containing your HansaWorld Enterprise application, especially the "Attach" folder.
If you are using journaling, you must do so in combination with the database duplication feature.
The database duplication feature will create a copy of your database and store it in the folder containing your HansaWorld Enterprise application. This process will result in the following files being created:
- While the first copy is being created, the file will be named "HANSA.HDB.TEMP".
- When the copy is complete, the file will be renamed "HANSA.HDB.COPY".
- When the second copy begins, a second file named "HANSA.HDB.TEMP" will be created.
- When the second copy is complete, the file will be renamed "HANSA.HDB.COPY". The previous "HANSA.HDB.COPY" will be renamed "HANSA.HDB.OLD". If there already is a "HANSA.HDB.OLD", it will be deleted.
There will therefore be a maximum of two entire copies and one partial copy in the folder at any one time. To be safe, make sure there is always enough disk space for three copies of the database. If there is insufficient disk space to make a copy, a notification mail will be sent to the Postmaster's Mailbox. The Postmaster is specified in the
Mail and Conference Settings setting in the E-mail and Conferences module.
Follow these steps to configure the database duplication feature:
- Select 'Technics' using the [Module] button in the Master Control panel or the Ctrl-0 (zero) (Windows and Linux) or ⌘-0 (Mac OS X) keyboard shortcut. Then, click the [Settings] button in the Master Control panel or use the Ctrl-S or ⌘-S keyboard shortcut.
- Double-click 'Timed Operations'. The following window appears:

- Enter in the Database Copy field the time when you want the database to be copied. Use the 24-hour clock, and place a colon (:) between the hour and the minute. If you would like the database to be copied twice a day, enter the second time in the Second Database Copy field (this must be later than the first copy time).
If you are also using the Backup option to create a daily text back-up, make sure the text back-up is created at a different time to the copy. They should not be created at the same time.
- If two copies a day are not enough, use the Continuous Database Copy feature. Check the Activate box and enter the number of minutes between copies. This is the number of minutes between the moment the last copy finished and the beginning of the next copy.

- Click the [Save] button in the Button Bar to save the changes. If you activated the Continuous Database Copy feature, the first copy will begin immediately.
By default, the database copy speed is set to approximately 1.25 Mb per second (4.5 Gb per hour). The speed is limited to ensure that the system remains usable while the database is being copied. You can change the default, but bear in mind that increasing the copy speed will make the system less responsive for the users, while reducing it may mean it will take too long to copy the database. A possible guideline is to set the copy speed to one third of the copy speed when no users are logged in.
To change the database copy speed, open the Optional Features setting in the System module and go to the 'Performance' card:

The database duplication feature creates a duplicate database by copying one section of the database at a time. Each section is known as a "buffer". In this example, we have specified a buffer size (size of each copied section) of 262144 bytes (256k) and a delay of 15000 microseconds between the end of one buffer and the beginning of the next. This will give a copy speed of about 16.7 Mb per second (58.6 Gb per hour). To calculate the copy speed, divide the buffer size in Mb (0.25 in this example) by the delay in seconds (0.015). The result (in this case, 16.7 MB per second) will be a theoretical maximum, which you should then reduce to allow for the time to copy the buffer (this time will be hardware dependent).
---
In this chapter:
Journaling
A busy system where many users are constantly saving large numbers of records can cause problems for a back-up strategy that relies on a
text back-up file being created once a day and/or on copying the database twice a day. The volume of new records means that the
text back-up file or
database copy quickly becomes out-of-date. If you need to revert to a back-up, it will be difficult and time-consuming if not impossible to recreate the records entered since the text back-up or database copy was made. The journaling feature is designed to address this problem. If you are using this feature, every new record and every modification will be saved in the database and in a separate journal file. If you need to revert to an older copy of the database, you will be able to "apply" the journal. "Applying" the journal means importing the recent new records and modifications to the older copy of the database from the journal file. This will be much faster and more complete than recreating the recent records manually, or extracting them from the damaged database.
You must use the journal feature together with the database duplication feature. If your database becomes damaged, you should revert to the most recent (undamaged) duplicate and apply the journal. It is not possible to revert to a text back-up and apply the journal. Therefore, if you are using journaling, you must make sure you are duplicating the database regularly. The text back-up will play a much less important role in your back-up strategy.
The journal file will grow in size very quickly, especially if you import large amounts of data while journaling is running. Therefore, you must take special care to monitor the level of free hard disk on the server if you are using this feature.
---
In this section:
See also:
Journaling - Starting Journaling
- You can start the journal feature using one of two methods:
- Launch the command line application on the server by typing:
- ./HansaWorld --start-journaling &
- Starts the HansaWorld Enterprise server application and marks the database as journaled. A new folder named "journal" will be created in the folder containing the HansaWorld Enterprise server application, and in that folder a journal file named "J0000001.HJN" will be created.
If you are using the service application (Windows) or a GUI single-user application, you will need to place the --start-journaling parameter in a "parameters.txt" file before launching the application, as described in the 'Launching the Server with Parameters ' section on the Loading an Existing Database and Company page. After starting the service, remove the parameter from the "parameters.txt" file. - If the server is already running and you don't want to restart it, log in from a client, change to the System module and open the Journaling setting:

Click the [Start Journaling] button. A new folder named "journal" will be created in the folder containing the HansaWorld Enterprise server application, and a journal file named "J0000001.HJN" will be created in that folder. You can also use the Journaling setting to start journaling in a single-user system.
- Referring to the Database Duplication page, establish a regular database duplication routine. If you need to revert to an old database, you must do so to one that was created after you started journaling. You cannot revert to a text back-up.
- Log on from clients in the usual way and begin work. Every change will be saved in the database and in the "J0000001.HJN" file.
- The next time you launch the command line or service application on the server, do so in the usual way (i.e. there is no need to use the --start-journaling parameter again). A message will be shown in the Terminal (Mac OS X and Linux) and in the log file as a reminder that journaling is in operation. You can also monitor this from a client by referring to the Journaling setting in the System module.
! | Never move, edit or rename the journal file or the "journal" folder. Make a copy of the journal file if you want to back it up. |
|
- If you need to update to a new version of HansaWorld Enterprise, you must do so by creating a text back-up from the old version, creating a new database using the new version and importing the text back-up. Full details are on the Updating to New Versions of HansaWorld Enterprise page. A side effect of importing a text back-up will be that journaling will be switched off. Therefore, after updating you must restart journaling as described above in steps 1-3 above. Before doing so, make sure that the "journal" folder in the folder containing the HansaWorld Enterprise server application is empty or removed altogether.
---
In this section:
See also:
Journaling - Applying the Journal
If you need to revert to an old database, follow these steps:
- The old database must be one that was created after you started journaling. If you are using the database duplication feature, the most recent database copy will be named "HANSA.HDB.COPY".
Before reverting to this old database, you may wish to check that it does not contain the damage that caused you to revert to it. You must carry out this check using a copy of the "HANSA.HDB.COPY" file and a copy of the "J0000001.HJN" journal file. If you use the "HANSA.HDB.COPY" file itself for this check, you will no longer be able to apply the journal successfully because you will break the synchronicity between the database and the journal. You must not even open the "HANSA.HDB.COPY" file or log in to it, let alone save any records before applying the journal.
To carry out this check, place a copy of the "HANSA.HDB.COPY" database in the folder containing the HansaWorld Enterprise server application and ensure it is named "HANSA.HDB". As this database was created after you started journaling, a "J0000001.HJN" journal file must be present in the "journal" folder when testing. This must be a copy of the journal file, because anything that you save when testing will be added to this file.
! | Make sure you have an untouched "HANSA.HDB" file and journal file at all times. |
|
- When you are sure that the "HANSA.HDB.COPY" file does not contain any damage, place it in the folder containing the HansaWorld Enterprise server application and ensure it is named "HANSA.HDB". Remember that this must be a database that is untouched by any testing. Similarly, the "J0000001.HJN" journal file in the "journal" folder must also be one untouched by any testing. It is recommended that you keep copies of both files, at least until you are sure the journal has been applied successfully, in case of a power failure or hardware problem occurring while the journal is being applied. Then, launch the command line application on the server by typing:
- ./HansaWorld --apply-journal &
- Starts the HansaWorld Enterprise server application and imports everything in the journal file that is not already in the database. The application will then quit.
Again, if you are using the service application (Windows) or GUI single-user application, you will need to place the --apply-journal parameter in the "parameters.txt" file before launching the application, and to remove that parameter from the "parameters.txt" file when the application quits.! | You must apply the journal immediately after reverting to the copy. If you open the copy and allow users to log in before applying the journal, the data in both the database and the journal file will be corrupted. |
|
- Restart the command line or service application in the usual way. After logging on from clients, every change will, as before, be saved in the database and in the “J0000001.HJN” file.
---
In this section:
See also:
Journaling - Managing Journal Files
In a busy system with many users, it is likely that the journal file will grow in size very quickly. To prevent journal files becoming too large, you can use the Journaling setting in the System module to create new journal files periodically. Large journal files, as well as being cumbersome, will increase the time required to apply the journal.
To create a new journal file, first open the Journaling setting. The journal file(s) that are currently in the "journal" folder will be listed on the right. In this example, we are still using the first journal file "J0000001.HJN":

Then, click the [New Journal File] button. This will create a new journal file (in this example, named "J0000002.HJN") and save it in the "journal" folder. It will also be listed in the 'Journaling' window:

All changes made in the database will now be saved in the new journal file. If you need to revert to an old database, everything in both journal files that is not already in the database will be imported when you apply the journal.
It may be that you establish a routine for creating new journal files, for example creating a new one once a week. As you will also be duplicating your database regularly, such a routine will allow you to discard the older journal files, thus ensuring that they do not take up too much hard disk space. The older journal files will become redundant because the work they contain will also be stored in the more recent duplicate databases. But careful management is required, to ensure that you can combine each duplicate database with the required journal files. For example, let us assume you have the following journal files:
Journal File | Date Created |
J0000001.HJN | June 1 |
J0000002.HJN | June 8 |
J0000003.HJN | June 15 |
J0000004.HJN | June 22 |
J0000005.HJN | June 29 |
J0000006.HJN | July 5 |
J0000007.HJN | July 12 |
If you need to revert to an old database, it must be one created after your oldest journal file. For example, to revert to the database created on July 10, you only need ensure that "J0000006.HJN" and "J0000007.HJN" are present in the "journal" folder when you apply the journal. Only these two journal files will contain work that is not in the database copy, so only these two files are needed to bring that copy up-to-date. The older journal files will do no harm if they are also present, but they are not necessary.
If the most recent database copy is from July 5, a date on which a new journal file was created, you should assume that "J0000005.HJN" will also be required when you apply the journal, because this may be the "current" journal file for that database. The "current" journal file is the one in which the last record was stored. When you create "J0000006.HJN", "J0000005.HJN" will remain the "current" journal file for the brief period until the next record is saved. This will be saved in "J0000006.HJN", which will then become the "current" journal file. If the database copy was made in the brief period before that record was saved, then "J0000005.HJN" will still be the "current" journal file in that database and so must be present in the "journal" folder when you apply the journal.
When you apply the journal, a message stating that "Current journal file not last file in journal folder J0000XXX.HJN" will be shown in the Terminal (Mac OS X and Linux) and in the log. In this message, "J0000XXX.HJN" is the "current" journal file for the database copy i.e. the earliest journal file that must be present in the "journal" folder. In the example, if you are reverting to a database copy created on July 10, this will be "J0000006.HJN". If "J0000006.HJN" is present in the "journal" folder, the journal will be applied. If it is not present, the journal will not be applied, and the Terminal and log will contain further messages, including "hole detected in journal". You should place "J0000006.HJN" in the "journal" folder and re-apply the journal.
The latest possible version of each journal file must be present in the "journal" folder when you apply the journal. As already mentioned, in the example, if you are reverting to a database copy created on July 10, you will need "J0000006.HJN" and "J0000007.HJN". This means the final version of "J0000006.HJN" as it was on July 12 at the moment that you created "J0000007.HJN", not any copy that you may have created on July 10 at the time of copying the database. A July 10 copy of "J0000006.HJN" will not be complete.
---
In this section:
See also:
Restoring from a Back-up
To restore from a back-up, you must first create a new database. Then import the back-up file using the 'Imports' function on the File menu in the System module.
The replacement of a safety back-up is a non-destructive process, i.e. the back-up file is not affected by the reading process. This means that you can use the same back-up file more than once.
For reasons of speed, it is recommended that the process of restoring from a back-up be carried out on the server machine in multi-user systems. If this is not possible, a single client machine should be used. If you have separate back-up files for different Companies, they should be imported individually. Attempting to import them simultaneously using different client machines could result in data being lost.
Restoring from a back-up is done in the following way:
- Move the old database (named "Hansa.HDB") to another folder/directory, to avoid mixing things up. Rename it so that you know what it contains.
- Delete the database file "Hansa.HDB" from the folder or directory with your Hansa application. Double-clicking the Hansa application now will force it to create a new database, as described here.
! | It is important to restore to a new, empty database, to avoid mixing the restored data with the old, damaged database. |
|
The "DBDef.txt" and "Default.txt" files should always be present in the same directory/folder as the Hansa application. They contain some important data used when setting up the new database and creating new Companies. If this file is missing, your Hansa application may not work the way you expect it to do!
- As part of the process of creating a new database, a list of back-up files is shown. To be included in this list, a back-up file must be stored in the "Backup" or "Setup" folder or directory, which should be in the same folder or directory as the Hansa application.
In the list, the filename of each back-up file is shown together with the date it was saved and any description added when it was created (see step 4 on this page).

- Highlight the file you want to import (the back-up to which you wish to revert) and press the Enter key (or double-click on the name of the file). The back-up data will be imported. A message window informs you about the progress of the import. For reasons of security, Hansa will close when the import finishes if the back-up file contains at least one record in the Person register. Restart the program and type your database key in to the Enabler setting: you will then be ready to continue working.
Note that there are certain circumstances in which Hansa will show files in the list of available back-up files, but not be able to import them successfully. This will occur on both Macintosh and Windows machines if the filename does not comply with the DOS naming convention (i.e. it has a maximum of eight characters followed by a three character extension). If the name of your back-up file does not comply with this convention (or it is not shown in the list of available files because it is not stored in the "Backup" or "Setup" folder or directory), continue with these steps:
- If it is still open, close the list of available import files using the close box.
- In the System module, choose 'Imports' from the File menu. The 'Imports' window is shown:

- Select 'Automatic, manual file search' and press the Enter key (or double-click on 'Automatic, manual file search').
In most operating systems, Hansa opens a standard dialogue box with a list of the files in the current folder of the current volume. To find the back-up file, scroll through the list or select another folder or volume in the normal way.

In some operating systems (e.g. Macintosh OS X), Hansa uses its own file dialogue window:

When the file dialogue window is first opened, the main part of the window shows the contents of the folder containing your Hansa application. Folder names are shown in angled brackets <>. Double-click a folder name to see its contents. Double-click the first item in the list (..) to go up one level. Click the [Desktop] button to go to your desktop, and the [Backup] button to enter the Backup folder that is inside the folder containing your Hansa application. This has been done in the illustration above.
- Once you have found the file you want to import (the back-up to which you wish to revert), highlight it and click [Open] or [Select] (depending on the operating system), or double-click on the name of the file.
A message window informs you about the progress of the import.
When the import has finished, Hansa will close, for reasons of security if the back-up file contains at least one record in the
Person register. Restart the program and type your database key in to the Enabler setting: you will then be ready to continue working.
The Raw Data Export
If your database somehow becomes damaged while you are using it, you will be prompted to create a Raw Data export. You should do so, using the
Raw Data Export function in the System module or, if you are working on the server, by launching the server application with the --rawdata parameter. The Raw Data option exports data in byte order, while the Database Text Backup option exports data in record order, on a register-by-register basis. When a database is damaged, the Raw Data option may create an export file where the Database Text Backup option fails.
If you need to revert to a back-up, you should do so in this order of priority:
- If you are using journaling, you should revert to the most recent undamaged copy of the database and apply the journal.
- If you are not using journaling, but you are regularly duplicating your database, you should revert to the most recent undamaged copy of the database and recreate the data entered since the duplicate was made.
- If you are not using journaling or database duplication, you should revert to the most recent text back-up of the database that does not contain any damage and recreate the data entered since the duplicate was made.
Please refer
here for more details about reverting to a back-up.
Do not under any circumstances regard the file created by the Raw Data export as a means of successfully rebuilding your database. Restoration from a Raw Data file is extremely unlikely to produce a useable database. At the very best, use a Raw Data file as a reference to help recreate the data entered since the last successful back-up, as mentioned in points ii and iii above. Due to the method used to create the Raw Data file, and due to the fact that a Raw Data file will be created from a damaged database, it will not contain any user passwords, it is likely that many settings will be missing, it probably will not contain any user accounts, and many records may be missing or incomplete. For example, many records may be missing from the Contact or Transaction registers, and data may be missing from hidden fields in stock transactions, making it impossible to rebuild stock or obtain an accurate stock valuation.
If you need to create a test database from a Raw Data file for use as a reference, use the GUI application to follow these steps:
- Make sure the folder or directory containing your HansaWorld Enterprise application does not contain a "HANSA.HDB" file and launch the application.
- When the 'Welcome to HansaWorld' window appears, click the [Master Database] or [Single User Database] button as appropriate. Follow the instructions on the Creating a New Database - Server or the Creating a New Database - Single-user pages respectively.
- Referring to the 'Single-user' section on the Changing and Adding Companies page, create all the Companies as they were in the damaged database (in particular, the Codes must be the same as they were in the damaged database).
- Create all Fiscal Years exactly as they were in the damaged database (in every Company).
- In every Company, configure the Company Date and Numeric Format setting in the System module as follows:
- Date Order
- Month, Day, Year
- All three check boxes
- ticked
- Date separator
- / or -
- Decimal separator
- . (a single full stop, not a comma)
- Thousand separator
- space (one single space)
- Ensure you are in the System module and use the Ctrl-Shift-I/⌘-Shift-I keyboard shortcut to open the 'Imports' window. Choose one of the options depending on where the Raw Data file is located and import it.
If the Raw Data file is large, you may prefer to use the command line (Linux or Mac OS X) or service (Windows) application for this step, as the speed benefit will be significant.
- Even if the Raw Data file is imported successfully, the database will not be useable because no indexes will be created. Therefore, you must immediately create a Database Text Backup and import that file to a new database. This will ensure the data is properly indexed. Again, you may prefer to use the command line (Linux or Mac OS X) or service (Windows) application to import the file.
- As mentioned in the introduction to this section, restoration from a Raw Data file will usually result in an incomplete database. You should only regard it as a test database that will help you with the process of re-entering information to the new "live" database. You may be able to do this by exporting from the test database using the relevant Export routine in the Integration module. The Transaction Registers Export will be particularly useful, as it allows you to export a specified range of records from every Sub System. If there is no suitable Export routine for the information that is missing from the new "live" database, use the test system as a guide enter the data manually to the new "live" database.
! | Never build a "live" database from a Raw Data file! |
|
---
In this chapter:
Updating from Previous Versions of Hansa
The latest version of Hansa is always available from Hansa's website,
www.hansaworld.com, from where upgrades should be obtained. If you are online, clicking the [Hansaworld.com] button in the Master Control panel will take you to this site.
Inevitably, new versions will incorporate significant structural changes. Because of this, it cannot be guaranteed that they will be able to open databases created by previous versions unless the export and import functions are used.
To upgrade, follow these steps:
- Before installing the new version, create a database back-up as usual using the old application.
- Download the new version of Hansa and install it in a new folder or directory.
- Ensure that the new folder or directory contains the "DBDef.txt" and "Default.txt" files, but not a "Hansa.HDB" file. Ensure it also contains a folder or directory named "Backup" which in turn contains the back-up file created in step 1, and that this file is named according to the DOS naming convention.
- Copy the following folders and their contents from the old Hansa folder to the new one: "Attach"; "Halcust"; "Shared"; "Tmp"; "Web"; and "Webcust". You may not have all of these folders in your installation: if so, copy the ones that you do have and don't worry about those that are missing. Do NOT copy the "Hob" folder.
- Launch the new Hansa application. A new database is created.
- Import the back-up created by the previous version of Hansa using the procedure described on the Restoring from a Back-up page.
For reasons of speed, it is recommended that backing up, restoring and upgrading are carried out on the server machine in multi-user systems. If this is not possible, a single client machine should be used. If you have separate back-up files for different Companies, they should be imported individually. Attempting to import them simultaneously using different client machines could result in data being lost.
- In multi-user systems, the new Hansa application should now be installed on all client machines. Repeat steps 2, 3, 4 and 5 above on each machine. If you have any Client Text Backup files, these should be imported to the new databases on the relevant machines as per step 6 above.
Updating to New Versions of Enterprise by HansaWorld - Updating Clients Automatically
When you update to a new version of Enterprise by HansaWorld, you should ensure that you are update to the same new version on the server and on all client machines. If you have many client machines in your network, updating them manually can be a laborious job. To make this task easier, you can use the auto update feature that will cause the version on the client machines to be updated automatically the next time they connect to the server.
To configure the auto update feature, follow these steps:
- By default, the auto update feature will transfer the new client applications through port 80 on the server. Opening this port might be undesirable and also requires superuser privilege in many systems. If you want to use a different port, create a text file named "serverip.dat" that contains the server's IP address and Web Port in the following format, on a single line:
- IP address:port
Note: do not place any carriage returns or any other characters after the port.
You can find the server's Web Port by opening the Program Mode register in the Technics module and going to the 'Web' card. If you need to specify a Web Port on the server or change the one that is there, you will need to restart the server for the change to take effect.
- Place the "serverip.dat" file in the "Hob" folders on every client.
- Set up a new Enterprise by HansaWorld installation on a client machine, with no database (no .hdb file). Create a folder or directory named "clientmp" and place it in the folder containing the Enterprise by HansaWorld application.
- Inside "clientmp", create one sub-folder or sub-directory for each client platform that you need, as follows:
Folder | For Client | Application Name |
books | Books Mac | Books.app |
hansaraamaosx | HansaRaama Mac (only used in Estonia) | HansaRaama.app |
hansaraamawin | HansaRaama Windows (only used in Estonia) | HansaRaama.EXE |
hansaraamawindowsnet | HansaRaama Windows .Net (only used in Estonia) | HansaRaama.EXE |
linuxxt | Linux XT | HansaWorld |
linuxwine | Linux Wine | HansaWorld.EXE |
macosx | Mac OS X Cocoa | HansaWorld.app |
win98 | Windows 98/NT | HansaWorld.EXE |
wince | Windows CE | HansaWorld.EXE |
windows | Windows 2000/XP | HansaWorld.EXE |
windowsnet | Windows .Net | HansaWorld.EXE |
This feature is not supported on Windows 7 clients.
- Copy the following files into the sub-folders or sub-directories from step 4:
- The "DBDEF.TXT" and "DEFAULT.TXT" files;
- The new version of the relevant Enterprise by HansaWorld application for the operating system. This must be named as shown in the list in step 4 (the names are case-sensitive). Depending on how you have configured your operating system, the file extensions may not be visible.
- The new "Hob" folder (which should contain the "serverip.dat" file from step 1, as this will ensure you don't need to repeat step 1 each time you update); and
- (optionally) a file named "AUTOUPDATEIMPORT.TXT", which can contain information that will be imported to each client database.
- The "windowsnet" folder should also contain the following files: "Boo.HtmlEditor.Shared.dll", "ColorPicker.dll" and "HtmlAgilityPack.dll".
- Create a folder or directory named "clients" in the folder containing the Enterprise by HansaWorld application that you are using.
- Start the Enterprise by HansaWorld application, change to the Database Maintenance module. To gain access to the Database Maintenance module, grant yourself full access to it in your Access Group and log in again.
Run the 'Create Autoupdate Clients' Maintenance function:

Tick the Client options that you need (each option should have its own folder as listed in step 4), specify the Folder (if different to step 6) and click the [Run] button.
The Maintenance function will create separate .ha files for each Client options, saving them in the "clients" folder (for example, "windows.ha", "windowsnet.ha" and "macosx.ha").
- On the server machine, create a folder or directory named "web" in the folder containing the Enterprise by HansaWorld server application.
- Copy the entire "clients" folder (containing the .ha files) into the "web" folder created in the previous step.
- Update your Enterprise by HansaWorld server application to the new version as described here, and then launch this application as normal.
- Log in from a client using the new version and change to the Technics module. To do this, you should be working on a client and you should have logged in as a system administrator (i.e. as a Person that has access to the Technics module) as described here.
Open the Available Client Version setting in the Technics module:

Enter the version number of the server application in one or both of the fields. When a client logs in using a version that is earlier than the one specified in these fields, the client will be asked to update. If the client version is earlier than the Minimum Client Version, the update will be mandatory. If the client version is earlier than the Available Client Version, the update will not be mandatory.
In most cases, it is recommended that you make updates mandatory, as shown in the illustration. This will ensure that all client machines are using the same version.
If the new version contains structural changes compared to the old, the update will be set as mandatory automatically, irrespective of the field that you use in this setting.
The version number of the server will be shown in the Terminal window when you launch the server and will be written to the log file at the same time.
It is now possible for the clients to log in, as follows:
- On a client machine, launch the old Enterprise by HansaWorld client application.
- After choosing the company, you will be told that a newer client is available, and whether the update is mandatory:

- Click the [Update Now] button. Your client application will be updated, as follows:
- Your client database will be backed up;
- The new client application, "Hob" folder and any other files will be downloaded to your client folder;
- The old client application, "Hob" folder, database and other files will be moved to a folder named "oldver"; and
- The new client application will be launched and the client text back-up imported.
- Log in as normal.
---
In this chapter:
Go back to:
Updating to New Versions of Enterprise by HansaWorld - Major Updates
Listed below are some major revisions that have been made to Enterprise by HansaWorld. When you update for the first time to a version that contains one of these revisions, you will need to update your data, usually by running a Maintenance function.
---
In this chapter:
Go back to: