Hi @Priyanka Mane ,
Quick notes:
You need both the log and data files to time-travel to a previous version.
Vacuum - does not delete the log files. It only deletes the data files, which are never deleted automatically unless you run the vacuum. Log files are automatically cleaned up after new checkpoints are added.
logRetentionDuration - Each time a checkpoint is written, Databricks automatically cleans up log entries older than the retention interval. In your case, when a new checkpoint is written, it clears the logs older than 2 days. Once this happens, you should not be able to do time travel as log files are now unavailable for that version.
And to delete the data files associated with the logs, you have to run a vacuum, as there is no other way to delete the data.
logRetentionDuration takes any calendar interval like x days, x weeks etc. Months and years are not accepted.
And finally, all these would help only when you are doing a new transaction, so there is a new checkpoint for logretentionduration.
I hope these details help.
Cheers.
Uma Mahesh D