PowerShell script exchange
Post Reply
sb1815
Novice
Posts: 4
Liked: never
Joined: Sep 10, 2011 12:41 am
Full Name: Tim
Contact:

backup scheduling

Post by sb1815 » Sep 10, 2011 12:59 am

We have a job scheduled for differential daily and full weekly.
the files are sent offsite to the cloud.
To reduce costs the customer wants to change the schedule so the full backup happens every other week.
I cant see how to set the backup to an every 2nd week schedule. I can only set it for weekly or monthly.
Is there a way to do this ?
Can i setup 2 full backups that are scheduled for the first and third friday, or will that mess up my differential backups.

Is there a better option for doing what i am trying to do?

Gostev
Veeam Software
Posts: 22981
Liked: 2882 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: backup scheduling

Post by Gostev » Sep 10, 2011 12:27 pm

You can run the job from command line using the Windows Scheduler. Thanks.

sb1815
Novice
Posts: 4
Liked: never
Joined: Sep 10, 2011 12:41 am
Full Name: Tim
Contact:

Re: backup scheduling

Post by sb1815 » Sep 12, 2011 4:08 am

Thanks for the quick response.

Will the differential backups automatically reset to backup the differences from the last full backup?
should i move both the differential backup and the full backup to use windows scheduler?
or should i leave the differential as is and just change the full backup to use windows scheduler?

Vitaliy S.
Veeam Software
Posts: 21527
Liked: 1281 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: backup scheduling

Post by Vitaliy S. » Sep 12, 2011 6:16 am

Every subsequent job run after full will be incremental one. There is no need to use windows scheduler for both incremental and full.

And just to save you some time, here is a PowerShell script example that triggers full job run: Backup Question

sb1815
Novice
Posts: 4
Liked: never
Joined: Sep 10, 2011 12:41 am
Full Name: Tim
Contact:

Re: backup scheduling

Post by sb1815 » Sep 12, 2011 6:59 pm

I configured my Veeam backup named BU2Cloud to do incremental backups on weekdays and a full backup on the first friday of each month.
Then I setup a task in windows task manager to run on the third friday, it runs "powershell C:\Disks\BkupTask\VeeamFullBkup.ps1".

VeeamFullBkup.ps1 contains these commands

Add-PSSnapin VeeamPSSnapin
Get-PSSnapin
Start-VBRJob BU2Cloud -FullBackup

Does that look right to you?
Did I miss anything?


thanks for your help.

Sethbartlett
Expert
Posts: 282
Liked: 25 times
Joined: Nov 10, 2010 6:51 pm
Full Name: Seth Bartlett
Contact:

Re: backup scheduling

Post by Sethbartlett » Sep 12, 2011 7:07 pm

Close, you would want to do something like:

Code: Select all

$Job = Get-VBRJob | ?{$_.name -eq "BU2Cloud"}
Start-VBRJob $Job -FullBackup
Granted, you could probably pipe one into the other but this also works just as well.
Skype: Sethbartlett88 - Make sure to label who you are and why you want to add me ;)
Twitter: @sethbartlett
If my post was helpful, please like it. Sometimes twitter is quicker to hit me up if you need me.

sb1815
Novice
Posts: 4
Liked: never
Joined: Sep 10, 2011 12:41 am
Full Name: Tim
Contact:

Re: backup scheduling

Post by sb1815 » Sep 12, 2011 9:16 pm

OK, this is what i have now in the VeeamFullBackup.ps1 file

Code: Select all

Add-PSSnapin VeeamPSSnapin
Get-PSSnapin
$Job = Get-VBRJob | ?{$_.name -eq "BU2Cloud"}
Start-VBRJob $Job -FullBackup
The only other thing i had to do was to rerun the Veeam setup and select to modify the install to include the powershell features.
I think it should work now,
Thanks for all your help.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests