Caja: end of out of phase copy operations

Hi,
i'm making backup copies with Caja.
I noticed, at my "expense", that when caja sends the notification that it has finished the operations in reality the operating system is still continuing to copy, most likely.
It is true that the unit must be disconnected from the file manager panel but in reality there is no visual communication of when this operation will actually be completed. :ninth:
Is there a way to match the times communicated with the Caja bar and the actual copying of the files?
When you copy a few data, the problem is relative but if you copy a bit if copy a lot GB... the situation gets complicated and becomes quite uncomfortable to manage. It is not known how long to wait. Furthermore, the problem is accentuated if you have to "pass" a pendrive to a virtual machine. The operations in progress easily cause damage to the data contained in the pendrive, not having clear the actual timing of the operations in progress and perhaps trusting Caja's inaccurate communication. :Wall:
I await useful advice and solutions for solving the problems indicated.
Thank you.

Hi and welcome to the Ubuntu MATE Community !
When you disconnect a drive using the side pane in Caja, a notification appears saying that you can now safely remove the drive. Only after this has appeared should you remove your drive in order to avoid data corruption.
I assume the time it takes to display that notification has to do with the size of the files you just copied and the speed of your drive. It won't appear if an operation is ongoing but generally doesn't take long.

We assume that this happens when I use not very performing pendrives and copy files of many gb, but I think the operation is the same.
In my opinion Caja copies the file and assigns it to some process on the operating system. When Caja receives communication from this process it brings up "Caja completed operations" or something like that. If I try to release the pendrive the operating system says that it is not possible, after a while, depending on the pendrive and the size of the file, a notification appears that it is possible to disconnect the drive. This is confirmed by the flashing of the led on the pendrive.
So, in my opinion, it is necessary that the communication with the operating system is improved in order to correctly show the speed and status of the copies.
It is probably necessary to intervene on the OS side, or perhaps it is already foreseen but some system variable needs to be modified.
So very often there is the risk of inadvertently extracting the pendrive damaging the data contained, I do not hide from you that sometimes it has happened to me.
I hope there is a solution.

This is something that all operating systems tend to do. The data is copied to a temporary portion of memory and then incrementally copied to the external drive.

This is why you have the unmount drive option on Gnu-Linux, Windows etc. The message that it is safe to remove the drive happens once the OS checks that everything has been copied across.

1 Like

however with windows the copy process is displayed in real time so it is much more difficult to inadvertently extract a pendrive. Why doesn't Caja visualize this process the same way? It is, in my opinion, the correct way to operate, if the computer has not finished the operations the copy window must remain open communicating that caja has not completed. Now instead Caja communicates the end of operations when in reality the operating system has not finished ... It is a relevant aspect in the case of slow pendrive, without LEDs, and very large data to be copied. Bye!

I realise that @HighMate finished his last message with "Bye!" and so is not looking for replies, but for completedness it's not entirely true that the windows copy process is displayed in real time.

Windows tries to avoid write-caching for removable drives but there is still the option to unmount because the file may even so still be in use. Usually, you'll get away with doing it but not always.

There are plenty of resources online with regards to this. Below are a just a couple -


2 Likes

Yes, exactly that. In Ubuntu or Ubuntu Mate is it possible to have this option which allows you to not enable / disable caching on USB drives? Would this allow you to choose the best copy profile for the user, as with Windows? In case you couldn't implement it for Mate as well (Ubuntu in general)?

Caja is part of and maintained by the MATE Desktop.

I would recommend opening an issue here: https://github.com/mate-desktop/caja/issues

To help avoid data corruption please see this workaround

1 Like