Quantcast
Viewing latest article 19
Browse Latest Browse All 4467

Log Files Associated With Deleted Jobs or Tenants Are Not Automatically Deleted

Log Files Associated With Deleted Jobs or Tenants Are Not Automatically Deleted

KB ID: 4720
Product: Veeam Backup & Replication
Veeam Cloud Connect
Published: 2025-04-09
Last Modified: 2025-04-09

Challenge

The diagnostic log files created by Veeam Backup & Replication / Veeam Cloud Connect that are associated with a deleted or disabled job, repository, or tenant are not automatically removed and remain on disk taking up space.

Cause

This is expected behavior as log file management only occurs for files associated with active jobs, components, and tenants.

Solution

Log files bearing the name of a deleted or disabled job, Veeam backup component, or Cloud Connect tenant may be manually removed as needed to free up disk space.

More Information

Users may choose to remove specific files or the entire contents of log folders if they wish. However, customers are advised to consider whether those logs will be needed for future issue investigations.
Veeam Intelligent Diagnostics
When Veeam ONE is configured to monitor a Veeam Backup & Replication deployment, it will analyze the Veeam Backup & Replication logs for the last 48 hours or since the last successful log analysis session.
Alternatively, users may consider removing all log files with a modified date older than some given point in time. For example, the following PowerShell script will purge all files within the default log folder (C:\ProgramData\Veeam\Backup\) older than 180 days.
Log Directory Truncation Script Example
This script is provided as a courtesy and is not directly supported by Veeam Technical Support.
# Define the folder path, file age, and file extensions
$folderPath = "C:\ProgramData\Veeam\Backup"
$fileAge = 180
$fileExtensions = @(".log", ".zip", ".log.gz")

# Exclude the vPower NFS Folder from removal.
$excludedFolder = "C:\ProgramData\Veeam\Backup\IRCache\NfsDatastore"

# Calculate the date threshold from which files will be considered old
$dateThreshold = (Get-Date).AddDays(-$fileAge)

# Identify and remove files based on extension and age.
Get-ChildItem -Path $folderPath -Recurse | Where-Object {
$fileExtensions -contains $_.Extension -and
$_.LastWriteTime -lt $dateThreshold
} | ForEach-Object {
Write-Output "Removing file: $($_.FullName)"
Remove-Item -Path $_.FullName -Force
}

# Remove empty folders.
Get-ChildItem -Path $folderPath -Directory -Recurse | ForEach-Object {
try {
if ($_.FullName -ne $excludedFolder) {
if ((Get-ChildItem -Path $_.FullName -Force).Count -eq 0) {
Write-Output "Removing empty folder: $($_.FullName)"
Remove-Item -Path $_.FullName -Force -Recurse
}
}
} catch {
Write-Output "Error removing folder: $($_.FullName) - $($_.Exception.Message)"
}
}
To submit feedback regarding this article, please click this link: Send Article Feedback
To report a typo on this page, highlight the typo with your mouse and press CTRL + Enter.

Viewing latest article 19
Browse Latest Browse All 4467

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>