Comprehensive data protection for all workloads
Post Reply
sonic23
Influencer
Posts: 23
Liked: 3 times
Joined: Sep 23, 2016 1:31 pm
Full Name: Jesus Martin
Contact:

Scheduled File Restore Test

Post by sonic23 »

Hi,

I just want to know if its possible in Veeam Backup to do an automated/scheduled file/database restore?

Thanks.
Shestakov
Veteran
Posts: 7328
Liked: 781 times
Joined: May 21, 2014 11:03 am
Full Name: Nikita Shestakov
Location: Prague
Contact:

Re: Scheduled File Restore Test

Post by Shestakov »

Hi Jesus,
You can leverage failover plan to recover VM. Regarding file and database level there is no option to schedule it from UI however you can use a powershell script.
Could you explain your use case by the way?
foggy
Veeam Software
Posts: 21138
Liked: 2141 times
Joined: Jul 11, 2011 10:22 am
Full Name: Alexander Fogelson
Contact:

Re: Scheduled File Restore Test

Post by foggy »

Hi Jesus, could you please describe your requirements in more detail? I believe you can achieve your goals with the help of PowerShell and also would like to pay your attention to SureBackup recoverability testing.
sonic23
Influencer
Posts: 23
Liked: 3 times
Joined: Sep 23, 2016 1:31 pm
Full Name: Jesus Martin
Contact:

Re: Scheduled File Restore Test

Post by sonic23 »

Hi Shestakov,

Thanks for getting back. We have a couple of requirements in our Business Continuity Plan to test restores every month, that is VM, file, and database restores and I've used surebackups already in the past to test only the VM image. Can you provide me a powershell script to automate a Guest VM file level restore? also if we can do this on database as well.

Thanks.
Shestakov
Veteran
Posts: 7328
Liked: 781 times
Joined: May 21, 2014 11:03 am
Full Name: Nikita Shestakov
Location: Prague
Contact:

Re: Scheduled File Restore Test

Post by Shestakov »

Here are some Powershell samples you can use.
I would suggest to keep using Surebackup by the way.
WRS2200
Enthusiast
Posts: 28
Liked: 3 times
Joined: Aug 06, 2015 8:21 pm
Full Name: Weston Strom
Contact:

Re: Scheduled File Restore Test

Post by WRS2200 »

Thank you for this post it was very helpful.
Shestakov
Veteran
Posts: 7328
Liked: 781 times
Joined: May 21, 2014 11:03 am
Full Name: Nikita Shestakov
Location: Prague
Contact:

Re: Scheduled File Restore Test

Post by Shestakov »

You are welcome. Windows task manager can be used to run those scripts on a specific time.
@WRS2200, could you describe your use case? Thanks!
sonic23
Influencer
Posts: 23
Liked: 3 times
Joined: Sep 23, 2016 1:31 pm
Full Name: Jesus Martin
Contact:

Re: Scheduled File Restore Test

Post by sonic23 » 1 person likes this post

Hi Nikita,

I was able to make my file and database restore tests using powershell work as you suggested. What I've notice is when invoking restore using powershell I'm not getting any email notifications even if it shows as successful in Veeam console. I have email notification enabled and tested it and works fine, its just not sending notification if launched in powershell. Any idea to resolve this?

Thanks.
Shestakov
Veteran
Posts: 7328
Liked: 781 times
Joined: May 21, 2014 11:03 am
Full Name: Nikita Shestakov
Location: Prague
Contact:

Re: Scheduled File Restore Test

Post by Shestakov »

Restore operation doesn`t call email notification since it`s not a job.
However you can either create Veeam ONE alarm if you use it or use Send-MailMessage cmdlet.
Thanks!
sonic23
Influencer
Posts: 23
Liked: 3 times
Joined: Sep 23, 2016 1:31 pm
Full Name: Jesus Martin
Contact:

Re: Scheduled File Restore Test

Post by sonic23 »

we have VeeamOne, trying it now but the "New" button is greyed out.
sonic23
Influencer
Posts: 23
Liked: 3 times
Joined: Sep 23, 2016 1:31 pm
Full Name: Jesus Martin
Contact:

Re: Scheduled File Restore Test

Post by sonic23 »

Nevermind..I got it :) Thanks..
Shestakov
Veteran
Posts: 7328
Liked: 781 times
Joined: May 21, 2014 11:03 am
Full Name: Nikita Shestakov
Location: Prague
Contact:

Re: Scheduled File Restore Test

Post by Shestakov »

You needed to choose category in the alalrm tree on the left for the alarm creation. Glad you`ve found it.
If you have questions about the alarm creation, feel free asking.
sonic23
Influencer
Posts: 23
Liked: 3 times
Joined: Sep 23, 2016 1:31 pm
Full Name: Jesus Martin
Contact:

Re: Scheduled File Restore Test

Post by sonic23 »

Lol..I'm back :) I checked this document from Veeam to know the Event trigger for restore but cant find anything.

https://helpcenter.veeam.com/one/alarms ... vents.html
Shestakov
Veteran
Posts: 7328
Liked: 781 times
Joined: May 21, 2014 11:03 am
Full Name: Nikita Shestakov
Location: Prague
Contact:

Re: Scheduled File Restore Test

Post by Shestakov »

There is no such a predefined alarm in the current version, but you can easily create it manually. As an alarm rule you can use these events:
210 Restore session started
250 Restore vSphere task finished
251 Restore Hyper-V task finished
290 Restore session finished
sonic23
Influencer
Posts: 23
Liked: 3 times
Joined: Sep 23, 2016 1:31 pm
Full Name: Jesus Martin
Contact:

Re: Scheduled File Restore Test

Post by sonic23 »

Tried it but didn't work..do I need to include the numbers as well? I defined it under "Backup & Replication" folder, and created the alarm on the "Backup Server". Is this correct? From the Alarm Settings, under "Rules" tab, I put "Rule Type" to be "Event", and the "Event Name" is "Restore session finished". I've assigned to the whole backup infrastructure and set the "Action" to "Send email notification" with my email on it. I ran my powershell FLR script, which is successful but I didnt get a notification.
Shestakov
Veteran
Posts: 7328
Liked: 781 times
Joined: May 21, 2014 11:03 am
Full Name: Nikita Shestakov
Location: Prague
Contact:

Re: Scheduled File Restore Test

Post by Shestakov »

You did everything correct except including the event number. Check if the restore event appeared in the Tasks & Events tab in Data Protection View of Veeam ONE Monitor.
sonic23
Influencer
Posts: 23
Liked: 3 times
Joined: Sep 23, 2016 1:31 pm
Full Name: Jesus Martin
Contact:

Re: Scheduled File Restore Test

Post by sonic23 »

It works now :) I went to "Data Protection" view as you've said and saw the event there, I right click and was able to create a new alarm. What I've noticed is the "Event Name" for the new alarm is "290 Veeam MP" and what I used a while back is "290 Restore session finished" (from an old thread). Thanks for your help!
Shestakov
Veteran
Posts: 7328
Liked: 781 times
Joined: May 21, 2014 11:03 am
Full Name: Nikita Shestakov
Location: Prague
Contact:

Re: Scheduled File Restore Test

Post by Shestakov »

You are welcome!
Glad that alarm finally works.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 150 guests