Windows 2025
Sponsored Link

Windows Server Backup : Scheduled Backup2024/12/27

 

Configure Scheduled Backup to run Backup regularly.

Yo can select the backup target, such as file unit or volume unit, but in this example, a full backup of the entire server will be taken.
And also the backup destination will be a local disk prepared specifically for backups in this example.

[1] Run PowerShell with Admin Privilege and Configure Scheduled Backup.
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

# confirm disks
PS C:\Users\Administrator> Get-WBDisk

DiskName       : QEMU HARDDISK
DiskNumber     : 0
DiskId         : a3f42897-d511-4208-be10-05bd6edce9b9
TotalSpace     : 171798691840
FreeSpace      : 171679080960
Volumes        : {Local Disk (D:)}
ContainsBackup : False
BackupVolumeId : 00000000-0000-0000-0000-000000000000
Properties     : ValidTarget

DiskName       : QEMU HARDDISK
DiskNumber     : 1
DiskId         : 85283995-698a-414d-8a73-a4c380b46f16
TotalSpace     : 85899345920
FreeSpace      : 43944283648
Volumes        : {EFI System Partition, Local disk (C:)}
ContainsBackup : False
BackupVolumeId : 00000000-0000-0000-0000-000000000000
Properties     : ContainsOemPartition, ContainsCriticalVolume

# set disks to a disk object
PS C:\Users\Administrator> $Disks = Get-WBDisk

# set empty backup policy object
PS C:\Users\Administrator> $Policy = New-WBPolicy

# add current system state to the backup policy
PS C:\Users\Administrator> Add-WBSystemState -Policy $Policy

# add baremetal revovery to the backup policy
PS C:\Users\Administrator> Add-WBBareMetalRecovery -Policy $Policy

# add source files/folders/volumes to take backup to the backup policy
# example follows specifies C dirive all
PS C:\Users\Administrator> New-WBFileSpec -FileSpec "C:" | Add-WBFileSpec -Policy $Policy

# set Volume Shadow Copy Service (VSS) option to the backup policy
PS C:\Users\Administrator> Set-WBVssBackupOptions -Policy $Policy -VssCopyBackup

# set backup tagret Path
# example below specifies local disk
# specify a disk from the result of [Get-WBDisk]
PS C:\Users\Administrator> $BackupLocation = New-WBBackupTarget -Disk $Disks[0]

# add backup tagret to the backup policy
PS C:\Users\Administrator> Add-WBBackupTarget -Policy $Policy -Target $BackupLocation

Label                  :
WBDisk                 : QEMU HARDDISK
WBVolume               :
Path                   :
TargetType             : Disk
InheritAcl             : False
PreserveExistingBackup : False

# confirm configured backup policy
PS C:\Users\Administrator> $Policy

Schedule              :
BackupTargets         : {QEMU HARDDISK}
VolumesToBackup       :
FilesSpecsToBackup    : {C:*}
FilesSpecsToExclude   : {}
ComponentsToBackup    :
BMR                   : True
SystemState           : True
OverwriteOldFormatVhd : False
VssBackupOptions      : VssCopyBackup

# set schedule for backup policy
# for multiple schedule, specify times with comma separated
PS C:\Users\Administrator> Set-WBSchedule -Policy $Policy -Schedule 15:00

Friday, December 27, 2024 3:00:00 PM

# set backup policy
PS C:\Users\Administrator> Set-WBPolicy -Policy $Policy
Warning
Do you want to format the backup storage disk QEMU HARDDISK?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): Y

# confirm configured backup policy
PS C:\Users\Administrator> Get-WBPolicy

Schedule              : {12/27/2024 3:00:00 PM}
BackupTargets         : {rx- 12/27/2024 2:59:02 PM Disk01}
VolumesToBackup       : {EFI System Partition, Local disk (C:), (Disk does not have drive letter)
                        (\\?\Volume{4c838546-6b3e-4d3f-9f53-c19e65ebd272}\)}
FilesSpecsToBackup    : {}
FilesSpecsToExclude   : {}
ComponentsToBackup    : {}
BMR                   : True
SystemState           : True
OverwriteOldFormatVhd : False
VssBackupOptions      : VssCopyBackup
Windows Server Backup : Scheduled Backup (GUI)
 

On GUI configuration, set like follows.

[2] Run [Server Manager] and click [Tools] - [Windows Server Backup].
[3] Select [Local Backup] on the left pane and right-click to open menu, then select [Backup Schedule].
[4] Click [Next] button.
[5] Select Backup Configuration. It selects [Full server] on this example.
[6] Set time to run Backup and Click [Next] button.
[7] Specify Destination Type for Backup target. It selects [dedicated hard disk] on this example.
[8] Select Destination Disk if you selected [dedicated hard disk] on previous section. Click [Show All Available Disks].
[9] Select Destination Disk for Backup.
[10] Click [Next] button.
[11] Read well the popuped message and if that's OK, Click [OK] button.
[12] Read well the popuped message and if that's OK, Click [Yes] button.
[13] Click [Finish] button.
[14] Click [Close] button to finish.
[15] Scheduled Backup has been configured.
Matched Content