Can a base file be changed to a standalone base file

I ask this because a few time I have had a problem with base not being able to open the requested file.This is because the JRE was unticked to use with Ubuntu 11.0.11, or vice versa.

Also just recently, there was a problem with my base file not been able to make the connection, but connection to what or where. The said base file was then reduce from 3.6mb to 0 bytes. Luckily I had a backup, but that was a few days old and I had to re enter the last 4 days of data again.

How can I prevent this happening again

Hello,

Please forgive me but some of your terms are not logical.

...standalone base file...

seems to mean having Base with a non-embedded database. If so this can be done in many different ways (most of which involve servers). But it would be best guessed as a split database - database residing outside of the Base document. For that see this post →
[Wizard] Create a new ‘split’ HSQL 2.x database

Please note that this will use a newer database (still HSQLDB) than the embedded version and may cause some errors in SQL (queries) which will need modifications.

This is because the JRE was unticked to use with Ubuntu 11.0.11, or vice versa.

I believe you are referring to openjdk of which I use v14.0.2 on Ubuntu 20.04.x

With various issues, it may be some problem(s) with your user profile. See → LibreOffice user profile

How can I prevent this happening again

There is no full prevention. Always something else which can go wrong. Best protection is having backups and not just on the same drive. With critical information, not even in same physical location.

Note, problems with Base using HSQLDB embedded may occur because of improper shutdown. For example, close Base and immediately power off PC. Possibly not enough time for Base to complete its’ processing of the DB in memory.