Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start-WBBackup + Exchange 2019 not clearing logs #24351

Closed
5 tasks done
askitee opened this issue Sep 27, 2024 · 3 comments
Closed
5 tasks done

Start-WBBackup + Exchange 2019 not clearing logs #24351

askitee opened this issue Sep 27, 2024 · 3 comments
Labels
Resolution-External The issue is caused by external component(s).

Comments

@askitee
Copy link

askitee commented Sep 27, 2024

Prerequisites

Steps to reproduce

ENV

  • Exchange Server 2019
  • running on Server 2019,
  • Circular logging not enabled
  • PS 7.4.3 (whichever version is currently issued via Windows Update)

Command
Start-WBBackup

Issue
When I back up servers running Exchange 2019, the logs are not being flushed when a successful backup is completed. If I run Windows Ses]rver backup in the same setup, it flushes the log files.

Function

# PURPOSE: Start-AssembleAndExecuteBackup - Assembles the required commands and values and executes the backup
function Start-AssembleAndExecuteBackup {
    try {
        $Policy = New-WBPolicy
        $BackupLocation = New-WBBackupTarget -NetworkPath "$NetworkFQTarget"
        
        Add-SeperatorLineToLog
        Add-UpdateLogWithSingleLine "L" "CREATED OBJECTS" ""
        Add-UpdateLogWithSingleLine "R" "Objects" "Policy, VolumeList, and Backup Target Location"
        
        Add-WBSystemState $Policy
        Add-WBBareMetalRecovery $Policy
        Add-WBBackupTarget -Policy $Policy -Target $BackupLocation
        Set-WBVssBackupOptions -Policy $Policy -VssCopyBackup
        
        Add-SeperatorLineToLog
        Add-UpdateLogWithSingleLine "L" "STARTING BACKUP" ""
        
        if ($str_Testing -eq "ON") {
            Add-UpdateLogWithSingleLine "R" "Backup Testing Mode" "ON (No backup performed)"
        } else {
            Add-UpdateLogWithSingleLine "R" "Email" "Email Notification Sent"
            Start-WBBackup -Policy $Policy -Verbose
        }
    } catch {
        Write-Error "An error occurred: $_"
        Add-UpdateLogWithSingleLine "E" "Backup Error" "$($_.Exception.Message)"
    }
}

Expected behavior

The log files should be cleared once a successful backup completes

Actual behavior

Logs remain unflushed, no errors a reported by PS or Event Log

Error details

[22:23:33] COMPLETION STATUS                  : 
[22:23:33]                              Email : Email Notification Sent
[22:23:33]                           Job Type : Backup
[22:23:33]                         Start Time : 26/09/2024 9:01 PM
[22:23:33]                           End Time : 26/09/2024 10:23 PM
[22:23:33]                          Job Items : Microsoft.Windows.ServerBackup.Commands.WBItem[]
[22:23:33]                          Job State : Completed
[22:23:33]                  Current Operation : 
[22:23:33]                            HResult : 0
[22:23:33]                    Detailed Result : 0
[22:23:33]                        Error Descr : 
[22:23:33]                                    : 
[22:23:33]                         Version ID : 09/26/2024-11:01
[22:23:33]                     SuccessLogPath : C:\Windows\Logs\WindowsServerBackup\Backup-26-09-2024_11-01-48.log
[22:23:33]                     FailureLogPath : C:\Windows\Logs\WindowsServerBackup\Backup_Error-26-09-2024_11-01-48.log
[22:23:33]                   Data Transferred : C:\Windows\Logs\WindowsServerBackup\Backup_Error-26-09-2024_11-01-48.log
------------------------------------------------------------------

Environment data

Name                           Value
----                           -----
PSVersion                      7.4.3
PSEdition                      Core
GitCommitId                    7.4.3
OS                             Microsoft Windows 10.0.17763
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

Nil to provide

@askitee askitee added the Needs-Triage The issue is new and needs to be triaged by a work group. label Sep 27, 2024
@mklement0
Copy link
Contributor

The command in question isn't being maintained in this repository.

Please follow the guidance in Can Windows/Non-Core Powershell 5 bugs be reported here? to determine the appropriate place to report your issue.

If you end up creating an issue in the Feedback Hub, please share a link to it here.

@kilasuit kilasuit added Resolution-External The issue is caused by external component(s). and removed Needs-Triage The issue is new and needs to be triaged by a work group. labels Oct 10, 2024
Copy link
Contributor

This issue has been marked as external and has not had any activity for 1 day. It has been be closed for housekeeping purposes.

Copy link
Contributor

microsoft-github-policy-service bot commented Oct 12, 2024

📣 Hey @askitee, how did we do? We would love to hear your feedback with the link below! 🗣️

🔗 https://aka.ms/PSRepoFeedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-External The issue is caused by external component(s).
Projects
None yet
Development

No branches or pull requests

3 participants