-
- Enthusiast
- Posts: 30
- Liked: 2 times
- Joined: Apr 30, 2012 5:54 pm
- Full Name: Brian Teichner
- Contact:
Backup Schedules
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.
-
- Chief Product Officer
- Posts: 31905
- Liked: 7402 times
- Joined: Jan 01, 2006 1:01 am
- Location: Baar, Switzerland
- Contact:
Re: Backup Schedules
You could use Windows Scheduler to create any complex schedule you like, and use that to start the job from command line.
-
- Enthusiast
- Posts: 30
- Liked: 2 times
- Joined: Apr 30, 2012 5:54 pm
- Full Name: Brian Teichner
- Contact:
Re: Backup Schedules
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?
-
- Chief Product Officer
- Posts: 31905
- Liked: 7402 times
- Joined: Jan 01, 2006 1:01 am
- Location: Baar, Switzerland
- Contact:
Re: Backup Schedules
Correct. The command line is provided on the Summary (last) page of the job wizard.
-
- Enthusiast
- Posts: 30
- Liked: 2 times
- Joined: Apr 30, 2012 5:54 pm
- Full Name: Brian Teichner
- Contact:
Re: Backup Schedules
Thanks
-
- Influencer
- Posts: 22
- Liked: never
- Joined: Mar 22, 2010 3:26 pm
- Contact:
Re: Backup Schedules
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?
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?
-
- Influencer
- Posts: 22
- Liked: never
- Joined: Mar 22, 2010 3:26 pm
- Contact:
Re: Backup Schedules
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
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
-
- VP, Product Management
- Posts: 27451
- Liked: 2822 times
- Joined: Mar 30, 2009 9:13 am
- Full Name: Vitaliy Safarov
- Contact:
Re: Backup Schedules
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.
...or as alternative you may want to use a PowerShell cmdlet to start your job. Thanks!
Code: Select all
"C:\Program Files\Veeam\Backup and Replication\Veeam.Backup.Manager.exe" backup bf361a17-60da-458e-be64-6ba241b7feab
-
- Influencer
- Posts: 22
- Liked: never
- Joined: Mar 22, 2010 3:26 pm
- Contact:
Re: Backup Schedules
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?
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?
-
- VeeaMVP
- Posts: 6166
- Liked: 1971 times
- Joined: Jul 26, 2009 3:39 pm
- Full Name: Luca Dell'Oca
- Location: Varese, Italy
- Contact:
Re: Backup Schedules
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.
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 -> 2022
Veeam VMCE #1
Principal EMEA Cloud Architect @ Veeam Software
@dellock6
https://www.virtualtothecore.com/
vExpert 2011 -> 2022
Veeam VMCE #1
-
- VP, Product Management
- Posts: 27451
- Liked: 2822 times
- Joined: Mar 30, 2009 9:13 am
- Full Name: Vitaliy Safarov
- Contact:
Re: Backup Schedules
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?
-
- Influencer
- Posts: 22
- Liked: never
- Joined: Mar 22, 2010 3:26 pm
- Contact:
Re: Backup Schedules
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"
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"
-
- VP, Product Management
- Posts: 27451
- Liked: 2822 times
- Joined: Mar 30, 2009 9:13 am
- Full Name: Vitaliy Safarov
- Contact:
Re: Backup Schedules
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?
-
- Influencer
- Posts: 22
- Liked: never
- Joined: Mar 22, 2010 3:26 pm
- Contact:
Re: Backup Schedules
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.
thank you for all the help and suggestions.
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 58 guests