• Advertisement

Can I get the Windows Server Backup from Server 2008 R2

Backup Related QA
Forum rules
Only Backup QAs

Can I get the Windows Server Backup from Server 2008 R2

Postby pramod » Fri Aug 20, 2010 10:57 pm

Can I get the Windows Server Backup from Server 2008 R2
pramod
 
Posts: 36
Joined: Sun Jun 27, 2010 10:19 am

Advertisement

Re: Can I get the Windows Server Backup from Server 2008 R2

Postby admin » Sun Mar 06, 2011 12:13 am

1.) Enable Windows PowerShell Support for Windows Server Backup


Import-Module ServerManager
Add-WindowsFeature Backup-Features -Include
Add-PSSnapin Windows.ServerBackup


2.) Create /Get/Edit Policy (Schedule)
The backup is controlled by the WBPolicy. This policy includes all the information necessary to perform a backup, including the backup schedule. You can create a new policy, retrieve an existing policy, or open an existing policy in edit mode to change it.


$BPol = Get-WBPolicy
$BPol = Get-WBPolicy -edit
$BPol = New-WBPolicy



3.) Include Volumes in the Backup
Create individual WBVolume objects by selecting on the MountPath (or other property) of the volume. Combine WBVolume objects as a list and add to the WBPolicy with Add-WBVolume.


$volC = Get-WBVolume –AllVolumes | Where {$_.MountPath –eq “C:” }
$volD = Get-WBVolume –All | Where {$_.MountPath –eq “D:” }
Add-WBVolume –policy $BPol –volume $volC,$volD



4.) Exclude Files/Folders from Backup
Next, create a new WBFileSpec object for each exclusion or inclusion. Inclusions and exclusions are assumed to be recursive unless -nonrecursive is specified. If no inclusions or exclusions are specified for a volume that is included, then the entire volume is assumed. Add all the WBFileSpec objects as a list to the WBPolicy.


$exclTemp = New-WBFileSpec –FileSpec D:\Temp –exclude
$exclMP3 = New-WBFileSpec –File “D:\Users\*.MP3” –exc
$exclWMA = New-WBFileSpec -File “D:\Users\Charlie\Music\*.wma” –exc –nonrecursive
$FileExclusions = $exclTemp,$exclMP3,$exclWMA
Add-WBFileSpec -policy $BPol -filespec $FileExclusions



5.) Define Backup Target/Device
Define one or more backup targets. WBBackupTarget objects can be dedicated external disks, dedicated or shared internal disks, or network share.
You can define a Backup Target as an external disk by selecting it from the WBDisk objects on the system.


$extDisk = Get-WBDisk | where {$_.Properties –eq “External, ValidTarget” }
Add-WBBackupTarget $BPol –target $extDisk


To back up to a network share, you need to first set the credential that will be used to connect to the share using Get-Credential.

$cred = Get-Credential DOMAIN\User
$netTarget = New-WBBackupTarget -NetworkPath \\server\share -cred $cred
Add-WBBackupTarget -policy $BPol -target $netTarget
admin
Site Admin
 
Posts: 49
Joined: Sun Jun 27, 2010 12:02 am

Hello there

Postby vupeannella » Wed Jun 08, 2011 12:10 pm

Hi everybody! I just want to say you THANKS for this excellent forum, there are so many interesting information here!
One more time - thanks.
vupeannella
 
Posts: 1
Joined: Tue Jun 07, 2011 3:18 pm
Location: Belgium


Return to Backup

Who is online

Users browsing this forum: No registered users and 0 guests

cron