4D 18 & LastBackupPath


In the new BackUp.4DSettings there is no
As far as I know, this change is not documented (in changes).

Now we have to work with the backupHistory.json to get the last backup path in “backupPath”:

  1. I think it would be necessary to have another option for the Get 4D folder (backupHistory_log) for the path of this file.

  2. Now we have to read the backupHistory.json looking for the last one.

We have to look for the last json element, because the first one that is saved, is the oldest one.

It would be easier and faster if the json first saves the newest. Then we have to read only the first element.
The json file in just 1 year will have at least 365 items.
It is not too much, but unnecessary work.


Read this:


…To limit the size of the file, the number of logged operations is the same as the number of available backups (“Keep only the last X backup files”) defined in the backup settings.

Hi Tony.

That’s what i was looking for.


You can also read https://blog.4d.com/deployment-made-easy-with-4d-v18/this blog post> explaining changes.
These changes have been made to separate settings and execution information.
And as Tony wrote, the number of logged operations is limited to the number of backups kept.
Best regards,

I used to read and parse the old “Backup.xml” file…

Since 4D v16, I use

<code 4D>
$vt_lastBackupPath:=Get 4D file(Last backup file)
</code 4D>

No need to read the settings file to get the info, much better :slight_smile:

Hi Bruno.


Thank you.