4D 18 & LastBackupPath

Hello.

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.

T.I.A.

Alfonso,
Read this:

https://doc.4d.com/4Dv18/4D/18/Configuration-and-trace-files.300-4575598.en.html

backupHistory.json
…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.

Thanks

Hello,
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,
Damien

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

Since 4D v16, I use
https://doc.4d.com/4Dv16/4D/16.6/Get-4D-file.301-4445138.fe.html

<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.

Great.

Thank you.