All Collections
Choosing an appropriate time to run a file optimisation or backup in MYOB
Choosing an appropriate time to run a file optimisation or backup in MYOB

Appropriate time to run a file optimisation or backup in MYOB

Updated over a week ago


If the following events occurs in this sequence, sales will be closed in WMS but will not appear in MYOB. Backups of MYOB typically run optimisation so this must also be considered.

In MYOB, a file optimisation is started. This usually takes up to a couple of hours on larger files, so users may start this before they leave for the day and go home.

At this point, the MYOB has created a new temporary company file which it has moved the optimized data into. This temp file is shown below. This file will as a separate temporary file until the user that started the optimisation presses the OK button in MYOB. Once the user presses OK, the original MYO file is renamed to a BAK file. The temp file is then renamed to become the MYO file. This has now swapped the temp file with the original company file.

The time between the optimisation completing and the user pressing OK is the danger zone. If the user went home after triggering the optimisation, then it is likely that the schedule replicate and import of sales will start and finish before the user arrives back to press the OK button.

Detail Steps

What does this mean?

Below is an example of what might happen if a user triggers an optimisation and leaves it to run overnight:

  1. The user starts the optimisation at 5:30pm which runs for two hours finishing at 7:30 pm.

  2. MYOB displays the message saying that optimisation is complete and sits waiting for the user to press OK. The temp file is waiting to replace(overwrite) the original Company file.

  3. The system starts the overnight WMS replication scheduled for 10:30pm. This replicate the MYOB company file data and then sends all the shipped sales into the original MYOB company file and sets the sale status in WMS to Closed. This process finishes at around midnight. The original company file now has the new invoices, but the temporary optimized file (which is still waiting for user to press OK) does not contain the invoices as it is an optimized copy from 5:30pm.

  4. The next morning, the user who triggered the optimisation arrives at work at 8:00am and see the message that the optimisation has completed and presses the OK button.

  5. MYOB then renames the original company file (containing all the invoices) to be a backup file and then renames the temporary file to become the new company file.

  6. Now the new optimized company file has replaced the original company file causing the invoices sent across at 10:30pm to be lost.

    The steps above only account for the loss of the data replicate by the scheduled task at 10:30pm. Realistically, there may be other users that have arrived at work earlier than the user that triggered the optimisation. If they have entered data into MYOB or sent sales across from WMS, this data up to the point where the user presses OK on the optimisation message, this data will also be lost.

What can be done to avoid data loss?

To avoid any loss or overwriting of data in the MYOB company file due to file optimisation, the time that the company file optimisation is performed is critical. This operation needs to be scheduled for a time during work hours where users can be told not to enter or send anything into MYOB, on a weekend during the day when the users will not be interrupted, or at anytime where the last step of pressing ok can be completed without any data being changed in MYOB since the optimisation was started. It is important that the user that triggers the optimisation is able to complete the process before any data is modified in MYOB.

Related Information


Did this answer your question?