Home / GitHub Page

Contents discrepancy among machines

I keep Joplin in three different Linux machines and an Android. After some trepidation, it seems everything is working. Nevertheless, file sizes are different even thou they seem to have the same contents.



Those two databases should contain the same data and so it seems when visited, searched, etc. In spite of that, file sizes are quite different. (Yes, they are synchronized).

Maybe there is some leftover that could be eliminated?
Different note versions could be kept in different machines and not synchronized?

You can run the VACUUM command on both databases to see if it makes a difference.

I did. Both files had their sizes reduced a little. Nevertheless, they still have different sizes even thou I have repeated several times the compacting the synchronizing procedures:

22937600 set 11 19:56 database.sqlite
29569024 set 11 19:58 database.sqlite

Both shrunk, but still there is a 7 MB difference between them.

You’d need to look at the actual data to see where the difference comes from.

Differences are possible.

One example: you create a note and before it was synced you delete it. So there will be entries in the delete_items table in your local database, but not in the others (Afaik).

I understand that. Nevertheless, I think it should not happen after you have run VACUUM on both copies, and resync’d. Especially if the sequence was repeated three or four times, as I did.

As to your example, for instance (delete_items table), I know it is empty because I have exported all the tables and I went directly to this one to see if it still retained any leftovers.

I did the same with some other tables, but not with all of them. I guess in the end I’ll be able to figure out why the difference is there.

Vacuum does not empty tables. So, if there are records in a table in one database and no records in the same table on another database, the size will still differ after a vacuum.

But in your case, if these tables are empty, the difference must be somewhere else.
My example was just that. There are other cases as well.

I’d expect the SQLite filesize is not directly related to its data. It might depend how and in which order the data has been added to the database. Perhaps after vacuum there are still holes in the file.

But anyway, if the data otherwise is valid it’s not a Joplin issue, but an SQLite one, and it’s most likely not a bug.

And you keep looking at the filesize but you still haven’t told us if the data is identical or not, which you can check for example in the Status screen of the apps.

As far as I can tell, the data are the same. One machine is sync’ed with the other. Perusing notebooks and notes, they look the same.

Nevertheless, when I first started using Joplin I had some issues synchronizing among machines. This was especially true when I was synchronizing between Linux and Android. Lately I have had no issues in this front.

Now that you referred to the Status screen, is there a way for me to clear the log and status files and start anew? This would allow me to check if there are new error messages (Those I see are not time stamped, but seem old).