Comprehensive data protection for all workloads
Post Reply
bteichner
Enthusiast
Posts: 30
Liked: 2 times
Joined: Apr 30, 2012 5:54 pm
Full Name: Brian Teichner
Contact:

Backup Schedules

Post by bteichner » Apr 30, 2012 5:55 pm

Is it possible to have one backup job with multiple different schedules? For example, I want to setup a backup job that runs at 10PM every night, except on Saturday (run at 5PM). We are offloading the daily backups to tape, and since the synthetic full job runs on Saturday, it is running into the scheduled backup we have to offload to tape. If I could start the synthetic full job earlier, this would solve the issue. It is about 1TB of data that it tries to roll-up in the synthetic full job and taking about 16 hours.

Gostev
SVP, Product Management
Posts: 24810
Liked: 3567 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: Backup Schedules

Post by Gostev » Apr 30, 2012 6:08 pm

You could use Windows Scheduler to create any complex schedule you like, and use that to start the job from command line.

bteichner
Enthusiast
Posts: 30
Liked: 2 times
Joined: Apr 30, 2012 5:54 pm
Full Name: Brian Teichner
Contact:

Re: Backup Schedules

Post by bteichner » Apr 30, 2012 6:17 pm

What is the syntax to start a Veeam backup from the command line? So within Veeam, the job would not be scheduled? It would just be set as a manual backup and handled completely from the command line/windows scheduler?

Gostev
SVP, Product Management
Posts: 24810
Liked: 3567 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: Backup Schedules

Post by Gostev » Apr 30, 2012 6:20 pm

Correct. The command line is provided on the Summary (last) page of the job wizard.

bteichner
Enthusiast
Posts: 30
Liked: 2 times
Joined: Apr 30, 2012 5:54 pm
Full Name: Brian Teichner
Contact:

Re: Backup Schedules

Post by bteichner » Apr 30, 2012 7:43 pm

Thanks

rvopat
Influencer
Posts: 22
Liked: never
Joined: Mar 22, 2010 3:26 pm
Contact:

Re: Backup Schedules

Post by rvopat » Jun 14, 2012 3:47 pm

ok i am trying to run multiple non typical schedules as well, and i have tried using task scheduler and i feel a little sheepish, but im not sure what i am doing wrong.

this is the command line from the last page of the job wizard: "C:\Program Files\Veeam\Backup and Replication\Veeam.Backup.Manager.exe" backup bf361a17-60da-458e-be64-6ba241b7feab

I created the task, and i was wondering do i put the backup bf361a17-60da-458e-be64-6ba241b7feab part in the arguements section or on the Program/script line?

I have tried both and it doesnt start the job.

What am i missing?

rvopat
Influencer
Posts: 22
Liked: never
Joined: Mar 22, 2010 3:26 pm
Contact:

Re: Backup Schedules

Post by rvopat » Jun 14, 2012 3:50 pm

Maybe this is more clear, i have tried this in the program/scrpit line: "C:\Program Files\Veeam\Backup and Replication\Veeam.Backup.Manager.exe" backup bf361a17-60da-458e-be64-6ba241b7feab - Job didnt start

and i have tried it with this in the program/script line: "C:\Program Files\Veeam\Backup and Replication\Veeam.Backup.Manager.exe" and this in the arguments field: backup bf361a17-60da-458e-be64-6ba241b7feab

job didnt start then either

Vitaliy S.
Product Manager
Posts: 23001
Liked: 1557 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: Backup Schedules

Post by Vitaliy S. » Jun 14, 2012 4:33 pm

Just create a batch file with this line (see below). I have just copied and pasted "my" line to a command prompt on my backup server and it did work.

Code: Select all

"C:\Program Files\Veeam\Backup and Replication\Veeam.Backup.Manager.exe" backup bf361a17-60da-458e-be64-6ba241b7feab 
...or as alternative you may want to use a PowerShell cmdlet to start your job. Thanks!

rvopat
Influencer
Posts: 22
Liked: never
Joined: Mar 22, 2010 3:26 pm
Contact:

Re: Backup Schedules

Post by rvopat » Jun 22, 2012 7:07 pm

Ok im getting a little frustrated at this. ive tried both batch files and power shell scripts and have to be missing something.

I have a .bat file saved on the desktop with this exact line in it:

"C:\Program Files\Veeam\Backup and Replication\Veeam.Backup.Manager.exe" backup bf361a17-60da-458e-be64-6ba241b7feab

the batch file is v6 Earth and VKSSQL1.bat

if i schedule that in a task using task scheduler it does not run. The task shows that it is running, but veeam does nothing. If i double click on the batch file it runs fine, and shows the progress in veeam.

Figuring i did somethign wrong with my batch file i made a powershell script.

the file is named v6 Earth and VKSSQL1.ps1 and contains this code:

Add-PSSnapin VeeamPSSnapIn

$job1 = Get-VBRJob -name “v6 Earth and VKSSQL1”
Start-VBRJob –Job ($job1)

again, if i schedule it the task shows that it is running but it doesnt start anything in veeam. But if i right click on the ps1 file and tell it to run in powershell it runs fine and shows progress not only in veeam but in the powershell window.

THe task is set to run even if no one is logged in - its setup to use the domain administrator account and password. the action is set to start a program, and this is the program script line:

"C:\Users\administrator.SOLOMONCORP\Desktop\v6 Earth and VKSSQL1.ps1"

what am i doing wrong?

dellock6
Veeam Software
Posts: 5734
Liked: 1625 times
Joined: Jul 26, 2009 3:39 pm
Full Name: Luca Dell'Oca
Location: Varese, Italy
Contact:

Re: Backup Schedules

Post by dellock6 » Jun 22, 2012 9:59 pm

The best way to run a powershell script in the task scheduler is using a string like this:

C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe “& ‘C:\Scripts\MyScript.ps1′”

Give it a try!
Luca.
Luca Dell'Oca
Principal EMEA Cloud Architect @ Veeam Software

@dellock6
https://www.virtualtothecore.com/
vExpert 2011 -> 2019
Veeam VMCE #1

Vitaliy S.
Product Manager
Posts: 23001
Liked: 1557 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: Backup Schedules

Post by Vitaliy S. » Jun 23, 2012 8:07 pm

What user account are you using to trigger this script via Windows Task Scheduler? Does this user account has sufficient permissions to access Veeam B&R server?

rvopat
Influencer
Posts: 22
Liked: never
Joined: Mar 22, 2010 3:26 pm
Contact:

Re: Backup Schedules

Post by rvopat » Jun 25, 2012 3:12 pm

Luca thank you for the suggestion, unfortunately that didnt work either.

I am using the administrator account for our domain - the same account that veeam was installed as and which the veeam services are running under.

i also tried putting

C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe in the program line

and the add arguments line :

-command "C:\psscripts\v6EarthandVKSSQL1.ps1"

Vitaliy S.
Product Manager
Posts: 23001
Liked: 1557 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: Backup Schedules

Post by Vitaliy S. » Jun 25, 2012 4:16 pm

Just to verify that everything is configured correctly, can you please try triggering any script that would create a simple txt file using the same credentials and script location?

rvopat
Influencer
Posts: 22
Liked: never
Joined: Mar 22, 2010 3:26 pm
Contact:

Re: Backup Schedules

Post by rvopat » Jun 27, 2012 3:04 pm

i did as you suggested vitality and it did work. i believe what ended up fixing it was running task with highest privileges - but today was the first day it started on its own from the scheduled task so i will monitor.

thank you for all the help and suggestions.

Post Reply

Who is online

Users browsing this forum: andrei.bruma and 60 guests