techsnapshots

Stay hungry Stay foolish….

  • Enter your email address to follow this blog and receive notifications of new posts by email.

    Join 2 other followers

  • Follow me on Twitter

    Error: Twitter did not respond. Please wait a few minutes and refresh this page.

Part4: Schedule Backups using the Microsoft Online Backup Services with PowerShell ISE.

Posted by techsnapshots on August 7, 2012


Schedule Backups using the Microsoft Online Backup Services with PowerShell ISE.

Note: You will the find the commands in Schedule file placed on your desktop

1. Create the Backup Policy to schedule the backup from PowerShell ISE

Here you will be creating variables for Backup Policy:

a. Backup policy name

b. File to be back up

c. Days and time to schedule the backup

d. Backup retention days

$policy = New-OBPolicy

$filespec = New-OBFileSpec -FileSpec “c:\Filesrv2”

$sched = New-OBSchedule -DaysofWeek <days of week> -TimesofDay <00:00>

 

$ret = New-OBRetentionPolicy -RetentionDays 7

 

Example:

 

2. Run the following commands to set the Backup Policy on Powershell ISE:

Add-OBFileSpec -Policy $policy -FileSpec $filespec

Set-OBSchedule -policy $policy -schedule $sched

Set-OBRetentionPolicy -Policy $policy -RetentionPolicy $ret

$ret = New-OBRetentionPolicy -RetentionDays 7

 

Click Yes when prompted.

The Policy automatically run to take backup on Scheduled time.

 

 

 

 

 

 

 


 

Advertisements

One Response to “Part4: Schedule Backups using the Microsoft Online Backup Services with PowerShell ISE.”

  1. google said

    magnificent issues altogether, you just gained a logo new reader.
    What would you recommend about your publish that you simply
    made some days in the past? Any positive?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: