What are .bak files in my home directory...?

Today I noticed about 20 files in my home directory with the .bak extension.

The original files are fine; there has been no corruption that I can detect while using writer, calc, draw. The .back files have the name of files I recognize and had edited on the days shown (date shown) on the .bak files.

What are these files? That is, when and for what reason do they get created?

I did notice some strange system behavior. Yesterday, when editing a .odg file, upon trying to save it to PDF (export as PDF), there were some problems.

First of all, the PDF created only one of the 4 sheets (pages) in the .odg file.

Secondly, thereafter, I noticed that baloo_file_ext was running non-stop and, according to “top -s5” was using 95% CPU as reported by the “%CPU” column of “top”. I had to ultimately kill the baloo_file_ext processes.

Additionally, I viewed the PDF files created using Okular. Thereafter, there were multiple okular processes running as reported by “ps -aux” and they would not exit even an hour after I had exited all Okular windows. I had to manually kill the processes.

So I’m not sure if the problem is with LibreOffice or with Dolphin or with Okular. I include Dolphin because searching around the internet revealed many, many discussions about Dolphin’s file indexing. Perhaps it was trying to index the .pdf files exported from LibreOffice Draw.

Here are some relevant screen grabs…

iostat output during the time okular and baloo_file_ext processes were running wild. In the iostat output, my solid drave disk is “nvme0n1” and sda and sdb are two external USB drives.
https://storage.imgbly.com/imgbly/k5uPJKg7EP.png

“top” output showing okular using 99.5% CPU…
https://storage.imgbly.com/imgbly/z4zPCFw0sG.jpg

Strange that it shows okular using 99.5% CPU but the overall CPU usage reported in the top summary shows about 7% CPU usage (user + system).

At the time I took these screen grabs, I had already killed the 6 baloo_file_ext processes.

.bak files are backup files created when you make a new file so for example I have xx.htm and the HTML Editor BlueGriffon makes xx.htm and when I save it it will also make xx.bak

1 Like

Always create backup copy


2 Likes

Thanks to you both.

I guess I’m a little embarrassed that I never noticed before…! I just happened to be perusing my home directory and noticed the .bak files.

I always use a versioning scheme for any file I create or edit, such as xxxx-V01,odt or xxx-V02.odt, etc for each file type. And I’m frequently backing up to 2 external hard drives using rsync.

But the built-in .bak scheme is good. If something gets corrupted, I have the most recent backup handy.

I’m going to post a separate question for the other issue, the performance issue.

Thanks again…

Quick question. If I need to recover a file using the .bak file, should I just rename it to remove the .bak extension prior to trying to open it?