One of the most vital points of every desktop application is the process of saving files. The work done by the user and the entered data cannot be lost. In case of a computer crash, we have to minimize the amount of lost work to the minimum.
With Banana Experimental 9.1.0 we introduced a new strategy for saving files. From a user's point of view nothing has changed, but internally we made some important improvements to make the process of saving files even more secure and fail-safe, and optimized for the use on cloud drives and mobile.
How it works
With the new implementation of the save and recovery process, Banana will make a local copy of the opened file and then work locally on the device (pc, mobile, tablet) until the user saves the document; at this point Banana will copy the changes back to the source file. In the meantime, Banana will regularly save the document's changes to the local copy.
Specifically, Banana does the following:
- The user selects a file to open (source file).
- Banana makes a local copy of the source file.
- Banana locks the source file to prevent changes from multiple users.
- Banana reads the local copy.
- Banana saves regularly (by default every 2 min) the document's changes to the local copy.
- As the user clicks on the Save button, Banana saves the document back to the source file.
- As the file is closed, Banana unlocks the source file and deletes the local copy.
- In case the application cannot properly close or save the file to the original location (power interruption or else), the local copy remains on the user device and the file content can be recovered at the next startup of Banana.
- In case the file is temporarily not available (i.e.: it is located on a disconnected shared disk or usb stick), the user can continue to work and the document's changes are saved to the local copy until the file is available again.
The local copy acts both as a working document and as a recovery document.
The autosave is always active, therefore the maximum amount of lost work corresponds to the last two minutes of work (with the default auto recovery settings).
The access to the file doesn't need to be continuously available. Even if the file is temporarily not available (i.e.: it is located on a disconnected shared disk or usb stick), the user can continue to work and the changes are saved to the local copy, until the shared disk is available again.
The local copy is not synchronized to the cloud. Therefore, the application's performance is improved and the amount of data sent to the cloud is reduced to the minimum.
The process implementation is the same on all operating systems: Windows, macOS, iOS, Linux, Android and webassembly, regardless of where the file is saved.
In case of interruption of the application, the local copy remains on the user devise. At the next startup of Banana, the application will warn the user that unsaved changes were found.
The user then has three possibilities to choose from:
- Open the recovered file;
The user can then decide to save the recovered file or discard it.
- Ignore the warning;
The user will choose what to do next time.
- Discard the recovered file;
The recovered file will immediately be discarded.
The local copy will exist on the user's device as long as the document is open or as long as the changes are not correctly sent back to the source file. The local copy of the file stays on the user's device only as long as the file is in use. Once it is closed it is deleted.
Local copies are stored in an hidden folder under the system's user's data. The user usually doesn't need to access this folder, and it is discouraged to do it. In case our support team asks you to open this folder, you can access it through the Develop Menu → System Info → Application → Working Copy path → Open path.
What it doesn't replace
This implementation does not replace:
- It does not replace a good backup policy
- It does not replace a versioning system
Even if this new implementation is very safe and robust, we cannot guarantee 100% that it will always work flawless. For this reason we encourage our customers to adopt a good backup policy and a versioning system.
Many operating systems provide some backup and versioning functionalities. Please take a look at the documentation of your operating system.