Windows Backup Administration.
The syntax below is for Windows Server 2008 R2 or later, other than where stated. See technet for earlier versions.

           --Create and enable a daily backup schedule or modify an existing backup schedule:
      WBADMIN enable backup [-addtarget:BackupTarget] [-removetarget: BackupTarget]
         [-schedule:TimeToRunBackup] [-exclude:ItemsToExclude]
               [-nonRecurseInclude:ItemsToInclude] [-nonRecurseExclude:ItemsToExclude]
                  [-systemState] [-allCritical]
                     [-hyperv:HyperVComponentsToExclude]     *Server 2012 or greater
                        [-vssFull | -vssCopy]                *Server 2012 or greater
                           [-user:UserName][-password:Password] [-quiet]
                              [-allowDeleteOldBackups]       *Server 2012 or greater

      WBADMIN disable backup [-quiet]    --Stop running the existing scheduled daily backups.

      WBADMIN start backup [-backupTarget:{BackupTargetLocation | TargetNetworkShare}]
         [-include:ItemsToInclude] [-exclude:ItemsToExclude]
            [-nonRecurseInclude:ItemsToInclude] [-nonRecurseExclude:ItemsToExclude]
               [-systemState] [-allCritical] [-noVerify]
                  [-user:UserName] [-password:Password]
                        [-vssFull | -vssCopy]      *Server 2012 or greater

      WBADMIN stop job [-quiet]    --Cancel the backup or recovery operation that is currently running.

      WBADMIN get disks            --List the internal and external disks that are currently online for the local computer.

      WBADMIN get items -version:VersionIdentifier [-backupTarget:{BackupDestinationVolume | NetworkSharePath}]
        [-machine:BackupMachineName]       --List the items included in a specific backup.

      WBADMIN get status   --Report the status of the backup or recovery operation that is currently running.

      WBADMIN get versions [-backupTarget:{BackupTargetLocation | NetworkSharePath}]
        [-machine:BackupMachineName]       --List details about the available stored backups. 

      WBADMIN start recovery -version:VersionIdentifier -items:{VolumesToRecover | AppsToRecover | FilesOrFoldersToRecover}
         -itemtype:{Volume | App | File} [-backupTarget:{VolumeHostingBackup | NetworkShareHostingBackup}]
            [-machine:BackupMachineName] [-recoveryTarget:{TargetVolumeForRecovery | TargetPathForRecovery}]
               [-recursive] [-overwrite:{Overwrite | CreateCopy | Skip}]
                  [-notRestoreAcl] [-skipBadClusterCheck] [-noRollForward] [-quiet]

      WBADMIN start systemstatebackup -backupTarget:VolumeName [-quiet]

      WBADMIN start systemstaterecovery -version:VersionIdentifier -showsummary
        [-backupTarget:{BackupDestinationVolume | NetworkSharePath}]
           [-machine:BackupMachineName] [-recoveryTarget:TargetPathForRecovery] [-authsysvol] [-autoReboot] [-quiet]

      WBADMIN delete systemstatebackup {-keepVersions:NumberofCopies | -version:VersionIdentifier | -deleteOldest}
        [-backupTarget:VolumeName] [-machine:BackupMachineName] [-quiet]

      WBADMIN start sysrecovery -version:VersionIdentifier -backupTarget:{BackupDestinationVolume | NetworkShareHostingBackup}
        [-machine:BackupMachineName] [-restoreAllVolumes] [-recreateDisks] [-excludeDisks] [-skipBadClusterCheck] [-quiet]

      WBADMIN delete catalog [-quiet]    --Delete the backup catalog from the local computer.
                                         --Use when the catalog is corrupt and cannot be restored with 'wbadmin restore catalog'.

      WBADMIN restore catalog -backupTarget:{BackupDestinationVolume | NetworkShareHostingBackup}
        [-machine:BackupMachineName] [-quiet]    --Recovers a backup catalog for the local computer from a storage location that you specify.

  -addtarget     Storage location for backups. A disk, volume, or UNC path.
  -allCritical   Include all critical volumes in the backups. Use only with -backupTarget. Can be used with -include.
  -allowDeleteOldBackups  Overwrite any backups made before the computer was upgraded.
  -authsysvol    If used, performs an authoritative restore of SYSVOL (the System Volume shared directory).
  -autoReboot    Restart the system at the end of the system state recovery operation.
                 This parameter is valid only for a recovery to the original location.
                 We do not recommend you use this parameter if you need to perform steps after the recovery operation.

  -backupTarget  The storage location for this backup. Requires an HD drive letter, a volume GUID-based path or UNC path.

  -exclude       A comma-delimited list of items to exclude from the backup: files, folders, or volumes.
  -include       A comma-delimited list of items to include in the backup: multiple files, folders, or volumes.

  -excludeDisks  Valid only when specified with -recreateDisks and must be input as a comma-delimited list of disk identifiers
                 (as listed in the output of wbadmin get disks). Excluded disks are not partitioned or formatted.
                 This parameter helps preserve data on disks that you do not want modified during the recovery operation.

  -hyperv        A comma-delimited list of components to be included in backup.
                 The identifier could be a component name or component GUID (with or without braces).

  -machine       The computer that you want backup details for. Use when backups of multiple computers are stored together.

  -nonRecurseExclude   Non-recursive, comma-delimited list of items to exclude from the backup.
  -nonRecurseInclude   Non-recursive, comma-delimited list of items to include in the backup. 
                       Use only with the -backupTarget parameter.

  -noRollForward Valid only when recovering applications. Allows for previous point-in-time recovery of an application
                 if the latest version from the backups is selected.
                 For other versions of the application that are not the latest, previous point-in-time recovery is done as the default.

  -noVerify      Specifies that backups saved to removable media (such as a DVD) are not verified for errors.
  -noInheritAcl  Apply the access control list (ACL) permissions that correspond to the credentials provided by the
                  -user and -password parameters to the folder that contains the backup.

  -overwrite     Valid only when recovering files. If a file being recovered already exists:
                     Skip       - Skip the existing file and continue with recovery of the next file.
                     CreateCopy - Create a copy of the existing file so that the existing file is not modified.
                     Overwrite  - Overwrite the existing file with the file from the backup.

  -recoveryTarget  The location to restore to. Use if this location is different than the location that was previously backed up.

  -recreateDisks Recover a disk configuration to the state that existed when the backup was created.
                 Warning: This parameter deletes all data on volumes that host operating system components.
                 It might also delete data from data volumes.

  -recursive     Valid only when recovering files. Recover the files in the folders and all sub-folders.
                 By default, only files which reside directly in the specified folders are recovered.

  -restoreAllVolumes  Recover all volumes from the selected backup. If this parameter is not specified, only critical volumes
                 (volumes that contain the system state and operating system components) are recovered.
                 This parameter is useful when you need to recover non-critical volumes during system recovery.

  -schedule      Times of day to create a backup, formatted as HH:MM and comma delimited.
  -showsummary   Report the summary of the last system state recovery (after the restart required to complete the operation).
                 This parameter cannot be accompanied by any other parameters.

  -skipBadClusterCheck   Skip checking the recovery disks for bad cluster information. If you are restoring to an alternate
                 server or hardware, we recommend that you do not use this parameter.
                 You can manually run chkdsk /b on your recovery disks at any time to check them for bad clusters, and then
                 update the file system information accordingly.
                 Warning: Until you run chkdsk the bad clusters reported on your recovered system may not be accurate.

  -systemState   Create a backup that includes the system state in addition to items specified with the -include.

  -user          The user with write permission to the backup storage destination.
                 A member of the Administrators group or Backup Operators group on the computer being backed up.
  -password      The password for -user.

  -version       The version of the backup in MM/DD/YYYY-HH:MM format. To view version information, type 'wbadmin get versions'.

  -vssFull       Perform a full back up using the Volume Shadow Copy Service (VSS).
                 All files are backed up, each file's history is updated to reflect that it was backed up, and the logs
                 of previous backups may be truncated.
                 Do not use this parameter if you are using a product other than Windows Server Backup to back up applications
                 that are on the volumes included in the current backup. Doing so can potentially break the incremental,
                 differential, or other type of backups that the other backup product is creating because the history that
                 they rely on might be missing and they might perform a full backup unnecessarily.

  -vssCopy       Perform a copy backup using VSS. All files are backed up but the history of the files being backup up
                 is not updated so you preserve the all the change information and log files.
                 This is the default value. A copy backup cannot be used for incremental or differential backups or restores.

  -quiet         Run the subcommand with no prompts to the user.

Volume paths can be specified using volume drive letters, mount points, or GUID-based volume names.
If you use a GUID-based volume name, it should be terminated with a backslash (\).

You can use the wildcard character (*) in the file name when specifying a path to a file.

ISO 8601 date formats are not (yet) supported by wbadmin.


Schedule backups of the folder d:\demo to the network location \\backupshare\BK1 at 12:00 Midnight. and 7:00 P.M.:

C:\> wbadmin enable backup –addtarget:\\backupshare\BK1 –include: d:\demo –user:SS64dom\user64 –password:pass30r6 –schedule:00:00,19:00

Recover data from the backup that was run on 2013-03-31 at 9:00 A.M., located on drive d:

C:\> wbadmin start sysrecovery -version:03/31/2013-09:00 -backupTarget:d:

Create a system state backup and store it on volume F:

C:\> wbadmin start systemstatebackup -backupTarget:F:

Perform a system state recovery of the backup from 03/31/2017 at 9:00 A.M.:

C:\> wbadmin start systemstaterecovery -version:03/31/2017-09:00

“Get back, get back, Get back to where you once belonged” ~ Get Back (The Beatles)


Windows Server PowerShell Backup Cmdlets
NTBACKUP - Backup folders to tape

Copyright © SS64.com 1999-2017
Some rights reserved