PowerShell script exchange
Post Reply
kalluri
Lurker
Posts: 2
Liked: never
Joined: Feb 13, 2013 12:39 pm
Full Name: chaitanya kumar
Contact:

Transform previuos full backup to roll backup

Post by kalluri »

Hi

I would like to do we have any script to run the transform previous full backup to roll back manually instead of scheduling to weekly in automatic mode.
veremin
Product Manager
Posts: 20406
Liked: 2299 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Transform previuos full backup to roll backup

Post by veremin »

If I've understood you correctly, the following script is likely to meet your requirements:

Code: Select all

Add-PSSnapin VeeamPSSnapin
$Job = Get-Vbrjob -name "Name of your job"
$OptionsToSet = $Job | Get-VBRJobOptions
$TransformIncrementsToSyntethic = $OptionsToSet.BackupTargetOptions.TransformIncrementsToSyntethic
$TransformToSyntethicDays = $OptionsToSet.BackupTargetOptions.TransformToSyntethicDays
$OptionsToSet.BackupTargetOptions.TransformIncrementsToSyntethic = $True
$OptionsToSet.BackupTargetOptions.TransformToSyntethicDays = (Get-Date).DayOfWeek
$Job.SetOptions($OptionsToSet)
Start-VBRJob -Job $Job
$OptionsToSet.BackupTargetOptions.TransformIncrementsToSyntethic = $TransformIncrementsToSyntethic
$OptionsToSet.BackupTargetOptions.TransformToSyntethicDays = $TransformToSyntethicDays
$Job.SetOptions($OptionsToSet)

1. Firstly, it saves original synthetic full schedule options.
2. Then, it enables “Transform previous full backup chain into rollbacks” setting.
3. After that, it gets actual date and sets it as the day for synthetic full backup.
4. Finally, it starts the job which according to the previously modified options performs synthetic full backup, transforming previous full backup chain into rollbacks.
5. When job finishes, settings are set to original values.

Hope this helps.
Thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests