Preventing data disaster

From The Document Foundation Wiki
Jump to navigation Jump to search
Other languages:
Deutsch • ‎English

This page is still under construction - help us to improve it!

Foreword

This article should help to avoid data loss and gives some hints.

Data security when using LibreOffice

Preventing data disaster

Every morning someone gets up, goes to the computer and observes:

″My data has disappeared, yesterday or just a moment ago they were still there″, see also Links to AskLibreOffice.

One way or another, it happens every day. We don't know how many people are affected.

Is it thoughtlessness, recklessness, indifference, or the hope ″Oh, nothing's gonna happen".

"It's all worked out fine so far".

But, the data disaster has just struck!

Then the panic is great.

Whether it is a job for school, university, employer or yourself, it is usually just important and urgent information that you have written down or entered, because it must be ready today or immediately.

- To the top -

Why can data be lost?

Here are a few examples:

  • The storage medium (hard disk, SSD, CD, DVD or stick) has been damaged and data can no longer be read.
  • The edited file was not saved, or the saving process was interrupted.
  • The edited file was saved in an incorrect file format.
  • Your cloud provider's app is not working as intended.
  • A system restore has removed the files on your desktop.
  • The program you were working with crashed unexpectedly.
  • An essential computer component suddenly fails.
  • There is a voltage dip or power failure.
  • The user overwrites a created file with an empty file.
  • The user accidentally deletes the created file.

The reality of why data is lost could go on and on.

However, most errors are not caused by hardware or software, but by the user.

How can we largely prevent data loss?

To prevent data from being lost, the so-called data backup is used.

And there are many possibilities.

It already starts with the editing of a document.

The more important a document is to you, the more often you should save it.

LibreOffice intern

Dialog box: Options Load/Save – General
Dialog "Options - LibreOffice - Advanced"
Dialog "Expert Configuration"

Saving Documents Automatically from latest help.

AutoRecovery

LibreOffice offers via the menu Tools ▸ Options ▸ Load/Save ▸ General at ″Save″ the possibility to save the AutoRecovery information every "X minutes" ("X" stands for the number of minutes).

LibreOffice uses the AutoRecovery information to recover a file after a crash.

What is the option Backup copy for and how do I recover a document?

Simple file duplication

In the simplest case you create a copy of the file.

Choose File ▸ Save a Copy… from the menu.

You will get the "Save a copy" dialog.

The file name of your document is now in the Filename field.

But you should change this Filename in any case, append to the name " bak01".

So, if the file name is e.g. "MYDOCUMENT", after the change in the field should stand "MYDOCUMENT bak01".

If you have also checked "Automatic file name extension" in the dialog, the complete name should be "MYDOCUMENT bak01.odt".

Now click on Save.

After the copy operation you can continue working on your original file.

The next time you choose File ▸ Save a Copy… and you are in the same directory as before, select the name "MYDOCUMENT bak01.odt" and change "01" to "02".

The entire name will then be "MYDOCUMENT bak02.odt".

You can increment this as you wish when saving copies.

However, if it is on the same data medium as the original, both versions of the file can be lost if the data medium is defective.

So it makes sense to save a copy of the important files at intervals on an external data medium.

Short-term storage or -backup

When working on a file, never save directly to an external disk connected via USB.

USB is relatively slow (compared to data transfer to main memory) and saving operations are "asynchronous" - that is: The operating system reports a completed save operation as soon as all data is in a memory buffer (in main memory).

But this does not mean that the data is already mapped to the (USB) memory!

Remember that a memory stick or an external hard disk has not yet saved all data when the file manager signals the end of the save operation.

Use the possibilities of your operating system, with the function Hardware safely remove and medium eject ▸ Medium eject of the data medium.

Therefore, always save their files first in principle on an internal drive in your PC.

Then you can use a memory stick or an external hard drive for short-term storage or backup.

For example, use your file manager to save a file from the internal drive to a memory stick or external hard drive.

 Note 
 Observe the memory stick or external hard disk until the indicator lamp stops flashing or the operating system releases the external memory.

- To the top -

Data backup

An already quite professional data backup is achieved if you use (one or more)

Data backup program

A backup program has the advantage that a complete backup of the computer data is usually performed.

This requires data medium that is large enough to store all this data.

Programs for data protection are also called backup programs for short.

These usually have extensive functions, such as:

  • the time planning of the backup
  • use of a backup scheme, such as incremental backup
  • possible encryption of the backup
  • possible password protection
  • Validation of the backup

- To the top -

Time/quantity factor

The time-volume factor plays an important role in data backup.

You should make this dependent on how many new files you create in a certain period of time and to what extent.

If you are a frequent writer or edit complex databases, you should back up your data as often as possible.

For this purpose you can use all the options listed above for your needs.

Data backup planning

Think carefully about what is the best procedure for you to keep your data as secure as possible.

The best thing is to make a note of what you want to do, make a backup plan.

Try to automate the backup process as much as possible.

And make a checklist of the actions to be taken manually.

See also Organisation on the PC - File management.

Residual risk

You have probably already noticed that a small residual risk always remains, but it is very low with correct data backup.

Surely you will not initiate the backup after every written word, but consider what can be restored with a radjusted effort.

- To the top -

File locations

 Note 
 In Windows there are some hidden files and you need to set Windows to show hidden files.
 In your file manager enter %AppData% to see the hidden files, see also Show hidden files, folders and drives.

Paths

In LibreOffice you can see the default paths to the important directories in LibreOffice.

These paths can be edited by the user.

To access this command:

  • Choose Tools ▸ Options ▸ LibreOffice ▸ Paths.
  • Choose Tools ▸ AutoText… - Button Path… (AutoText only).

The paths used by LibreOffice

Default

Use the Default button to set the predefined paths again for all selected entries.

Edit

Click here to open the Select Folder dialog.

You can change the order of the entries by clicking on Type.

You can change the column width by moving the separator between the columns with the mouse.

The following list contains the default paths for storing user-related data and a description of what kind of user-related data is stored in the path.

Use the Edit button to change, add or delete paths of the different types.

Default Paths Table

Internal paths

Internal paths shows the paths where predefined content for LibreOffice is installed.

These paths cannot be edited in this dialog.

The paths point to subfolders of the {installation folder}\share folder.

These subfolders are read-only and contain content that is available to all users.

The location of the {Installation Folder} folder is determined when LibreOffice is installed.

Change the My Documents directory

If you call in LibreOffice dialog to Open a document, you see there first your My Documents directory.

To change this directory, proceed as follows:

  1. Choose Tools ▸ Options ▸ LibreOffice ▸ Paths from the menu.
  2. Click on "My Documents" and then on Edit or double click on the "My Documents" entry.
  3. In the "Select Folder" dialog, select the desired directory and click Select Folder.

Change other directories

The dialog contains other directories for other functions (Types).

Here you change in a similar way the directory that LibreOffice displays when you assign a path for another Type.

Proceed according to step 2, but click on the corresponding directory entry of the Type.

In the "Select Folder" dialog, select the desired directory and click Select Folder.

File Backup

Path - Backup copies

In addition, a check mark can be set there to ″Always create a backup copy″.

This means that when you save a document, the previously saved status of the document is saved in a copy with the extension .bak.

The next time you save, it will be overwritten by the next state.

This is an action that is primarily intended to enable you to go back to an earlier status yourself if you have made mistakes while editing a document.

Backup copies are stored in the directory that is defined in Extras there at Backup copies is set.

Under Windows 10, the backup copies are stored by default in the directory C:\Users\USERNAME\AppData\Roaming\LibreOffice\4\user\backup deposited.

If you have created a partition on your hard disk in the PC or have a second hard disk there, you can consider changing the backup directory there.

If you cannot open a *.BAK file in LibreOffice, you can rename it to .ODT or make a file association in the operating system for .BAK.

See: Change default programs

If you use other programs that also store .BAK files, you may want to disable permanent association.

See also: Extension

What is the option Backup copy for and how do I recover a document?

The User Profile folder

The {User Profile} folder and its subfolders contain the user-related data.

Backing up the user profile at regular intervals

The user profile is the folder where all user-related data such as extensions, custom dictionaries, document templates, etc. are stored.

The more you make changes to it, the more sensible it is to create a backup afterwards.

- To the top -

Further Informations

Lock file

The lock file is created when a document is opened and normally deleted when the document is closed.

Format representation of a lock file: .~lock.FILENAME.FILEext#

The lock file is located in the same directory as the opened document or it is created there when opened 1).

The prerequisite for this is that the directory being worked in has write permission.

Its purpose is to prevent more than one user from editing a document in a multi-user environment, which would be a problem.

The first user who opens the file can edit the document, but all subsequent users who open the document can only read it.

That is, it is needed for two purposes:

  1. With some file systems, there is no (reliable) locking of a file when an application opens it. This can lead to the file being opened for editing by two (or more) applications (e.g. over a network), which then write to the file independently, with disastrous consequences. In this case, creating the lock file tells the other LibreOffice/OpenOffice (the two applications that know to look for the file) that the file is already in use.
  2. Also, the lock file contains the information about who and where opened the file, which is helpful, if a user wants to edit a file that has already been opened by another user, and when he sees this information, he can call the other user and ask him to close the file.

It may happen that the lock file cannot be deleted if Office or the operating system blocks.

For example, it might be left over if LO crashed while a file was open, so that no normal exit occurred.

The lock file then remains in the directory.

In this case, the file is opened in read-only mode.

The lock file must be deleted to restore edit mode.

For example, if your file is MyFile.odt:

Look for a file .~lock.MyFile.odt# in the same directory.

If the corresponding lock file exists there, it is a remnant of an editing session, which was not closed properly due to an error.

Delete it before opening MyFile.odt again.

In Windows, the lock file is a hidden file and you need to set Windows to show hidden files.

In your file manager enter %AppData% to see the hidden files, see also Show hidden files, folders and drives.

1) If you don't want this, your only option is to disable locking altogether, go to Tools ▸ Options ▸ LibreOffice ▸ Advanced and 
 click on the button: Expert Settings….
 Search for: UseLocking and set org.openoffice.Office.Common\Misc\UseLocking to false.

Recently used documents

Recent Documents

When you start LibreOffice, you get the start screen.

Here you can see, among other things, the most recently used documents.

With a mouse click you can open one of the displayed documents.

However, this display of the most recently used document is only a link to the actual document.

As long as the document remains in the folder path in which it was saved, this function is guaranteed.

If for some reason you move or delete the document there, for example with the file manager, LibreOffice will no longer find this file from the display of the last used documents.

You can open LibreOffice and use the menu File ▸ Open to find and open the file, if it still exists at all.

Show hidden files

Show hidden files, folders and drives.

As described above, enter %AppData% in your file manager to see the hidden files.

For a permanent display of the hidden items:

Show hidden files and folders in Windows

Windows 10

1. Open File Explorer from the taskbar.

2. Select View ▸ Options ▸ Change folder and search options.

3. From the "View" tab and under "Advanced settings", select "Show hidden files, folders and drives" and OK.

Windows 11

1. Open File Explorer from the taskbar.

2. Select View ▸ Show ▸ Hidden Items.

Or click on the icon ThreePointIcon.png and choose Options and select "Show hidden files, folders and drives" from the View tab and under Advanced Settings and OK.

Antivirus/Defender - Controlled folder access exception

Setting up a controlled folder access exception for Defender for LibreOffice

Possible printer troubleshooting under LibreOffice

Please check the information given here for your printer.

Manufacturer specifications

Which manufacturer is the printer from?

What type, model of printer do you use?

Is it a multi-function printer?

For information about your printer, refer to the printer manual or the printer manufacturer's website.

Has the printer been installed with its required components in the operating system?

Does the printer have an up-to-date printer driver?

Connections / Interfaces

Is the printer switched on?

Is the printer connected to the PC?

What is the connection of the printer - USB, Wifi, Network?

In case of USB connection, check the connectors on the PC and printer.

Check if the printer selected in the print dialog is the currently connected version, e.g. if it is connected via WiFi but was originally set up via USB, make sure that the printer connected via WiFi is selected and not the USB.

Also, if it is a multi-function printer, make sure that the fax printer is not selected.

Is the printer registered as the default printer in the operating system?

Have you accidentally marked a space? Then deselect it.

Paper

Is there enough paper in the printer?

Has the correct paper tray been selected on the printer?

Was the paper (envelope, etc.) loaded correctly?

Ink / Toner

Is there enough toner or ink available?

For inkjet printers, check if a print head cleaning needs to be initiated.

Is your toner cartridge in order, the toner not gummed up.

Removing the toner cartridge and gently shaking it may help.

Put old newspaper under it.

Advanced Check

Can you print from other applications?

Select older LibreOffice version from archive

 Attention 
 It is strongly recommended to download the latest supported LibreOffice versions from libreoffice.org and use them.
 Older versions are no longer maintained and they may contain security vulnerabilities and risks.

A video link on the topic (in German [DE]): Ältere LibreOffice Version aus dem Archiv auswählen

Using Windows as an example

You can download older versions of LibreOffice from the archive.

As an example, search for version 6.4.7.2, Windows 64 bit, with the helppack /en.

Select older LibreOffice version from archive, 6.4.7.2

Enter the following link in your internet browser: tdf.io/archiv

You are now on the home page of the LibreOffice archive.

Here all previous versions of LibreOffice are listed and can be selected.

Since LibreOffice exists for different operating systems and bit-values, you will be taken step by step from the first click on the versions.

The page starts with version 3.3.0.4.

Scroll down to see higher versions.

Now click on the version number you want.

In the next selection, choose the operating system name you want.

In this example select "win".

The next selection determines whether 32 - or 64 bit.

Select "x86_64/" for 64 bit.

In the following selection you see now the actual program and different helppack files for different languages.

Click above the program "LibreOffice_6.4.7.2_Win_x64.msi".

The download for the program LibreOffice version 6.4.7.2, 64 bit starts.

When the download is finished click on the helppack "LibreOffice_6.4.7.2_Win_x64_helppack_en.msi" below.

When you have downloaded the program and helppack, you can start the installation on your PC.

Links to AskLibreOffice

Links to AskLibreOffice.com [EN]

TimeStampBackup Extension

Extension

One way to do this is the extension TimeStampBackup:

If you use the icon or command provided by this extension instead of the ″Save″ icon or menu command, each time you save, a copy of the previous state is saved under a unique name containing the date and time so that you have a history of your saved versions.

Organisation on the PC

Organisation on the PC - File management

File management

- To the top -

Documentation / Manuals

Here you will find the Documentation / Manuals:

Documentation / Manuals

Any questions?

For questions on this topic go to:

Ask.LibreOffice

Get Involved

Join us today and help us to make it even better!

Get Involved

LibreOffice is Free Software and is made available free of charge.

Your donation, which is purely optional, supports our worldwide community.

If you like the software, please consider a Donation.

Link to the Video

Link to the Video:

Preventing data disaster – LibreOffice 6.4

- To the top -