Feature Request - More detailed schedule and backup through

Backup agent for Microsoft Windows servers and workstations (formerly Veeam Endpoint Backup FREE)

Re: Feature Request - More detailed schedule and backup thro

Veeam Logoby rereduck » Tue Jun 23, 2015 9:09 am

Thanks Mike for your answer.

To do simple, I want this :

Image

I want to backup a PC that is used by enduser but with critical data on it for his activity and I cannot put data in another place. So I would like to backup computer 6 times a day. For example : 8AM, 10AM, 12AM, 15AM, 17Am, 20AM.

Thanks :)
rereduck
Influencer
 
Posts: 24
Liked: 1 time
Joined: Mon Dec 09, 2013 9:11 am

Re: Feature Request - More detailed schedule and backup thro

Veeam Logoby Vitaliy S. » Tue Jun 23, 2015 11:43 am

Ok, thanks for your feedback, currently the only way to do that is to use specific events during the working day.
Vitaliy S.
Veeam Software
 
Posts: 19558
Liked: 1102 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: Feature Request - More detailed schedule and backup thro

Veeam Logoby LinusH » Sun Oct 04, 2015 7:58 pm

Hi,
Just for your information, I'm also looking for a way to backup files more often than daily. I already use Veeam B&R and it can save SQL logs often, but not files.
Please add this to VEB! (or can you suggest some competetive software?)

Br Linus Hellsing
LinusH
Novice
 
Posts: 7
Liked: 2 times
Joined: Mon Feb 09, 2015 8:32 am
Full Name: Linus Hellsing

Re: Feature Request - More detailed schedule and backup thro

Veeam Logoby Vitaliy S. » Mon Oct 05, 2015 11:41 am 1 person likes this post

You will be able to do that with our next minor update > Feature Request - More granular backup schedule settings
Vitaliy S.
Veeam Software
 
Posts: 19558
Liked: 1102 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: Feature Request - More detailed schedule and backup thro

Veeam Logoby Dima P. » Mon Oct 05, 2015 3:34 pm 2 people like this post

Hey folks,

Code: Select all
Veeam.EndPoint.Manager.exe /backup

Feel free to test the said functionality in latest update. Since auto update will not be enabled immediately, for now you can download the build manually from our website. Encourage everyone to jump in and test the ability to start the backup via command line – it may help you to create custom scripts and personal schedules with windows task manager.
Dima P.
Veeam Software
 
Posts: 6242
Liked: 440 times
Joined: Mon Feb 04, 2013 2:07 pm
Location: SPb
Full Name: Dmitry Popov

Re: Feature Request - More detailed schedule and backup thro

Veeam Logoby yasuda » Mon Oct 05, 2015 4:45 pm 1 person likes this post

For me, this is not a minor update; it is huge! Thank you.

What are the available command line switches? How do you trigger a stand-alone full backup? The /backup switch started a regular backup.
yasuda
Enthusiast
 
Posts: 45
Liked: 10 times
Joined: Thu May 15, 2014 3:29 pm
Full Name: Peter Yasuda

Re: Feature Request - More detailed schedule and backup thro

Veeam Logoby Dima P. » Mon Oct 05, 2015 5:10 pm

Glad to hear! /backup is for regular ad-hoc (incremental or the first full in the chain) and /standalone for standalone full backup
Dima P.
Veeam Software
 
Posts: 6242
Liked: 440 times
Joined: Mon Feb 04, 2013 2:07 pm
Location: SPb
Full Name: Dmitry Popov

Re: Feature Request - More detailed schedule and backup thro

Veeam Logoby LinusH » Mon Oct 05, 2015 7:07 pm 1 person likes this post

Vitaliy S. wrote:You will be able to do that with our next minor update > Feature Request - More granular backup schedule settings


'Thats only 27h after I posted my message. Great Scott, you are fast! This update will suddenly open up a new world for us, thank you! :-)

Br Linus
LinusH
Novice
 
Posts: 7
Liked: 2 times
Joined: Mon Feb 09, 2015 8:32 am
Full Name: Linus Hellsing

Re: Feature Request - More detailed schedule and backup thro

Veeam Logoby Dima P. » Tue Oct 06, 2015 2:05 pm

LinusH,
I am glad to hear that! Don’t forget to share the script examples with the community – it’s always highly appreciated.
Dima P.
Veeam Software
 
Posts: 6242
Liked: 440 times
Joined: Mon Feb 04, 2013 2:07 pm
Location: SPb
Full Name: Dmitry Popov

Re: Feature Request - More detailed schedule and backup thro

Veeam Logoby LinusH » Tue Oct 13, 2015 10:10 am 1 person likes this post

Dima P. wrote:LinusH,
I am glad to hear that! Don’t forget to share the script examples with the community – it’s always highly appreciated.


I actually wrote a script so I could get emails and see log files but it turned out that my Veeam B&R installation mailed me anyway so I actually don't use it. But in case someone else is interested, perhaps if you don't have Veeam B&R, here is the powershell script. It uses a logging script i have borrowed from Luca on this site: http://9to5it.com/powershell-logging-function-library/

Oh, my script have problems understanding if it had sent an email or not but since I don't use this script anymore, I haven't fixed it.

The script need this to function:
* The above mentioned logging script in the same folder.
* A subfolder called log
* Mail information
* In case you have installed Endpoint in a non-standard folder, you need to update that as well
* The exec policy must be set to Unrestricted for the scope LocalMachine like this:
Code: Select all
Set-ExecutionPolicy Unrestricted -Scope LocalMachine


Good luck! :-)

Code: Select all
# Run_endpoint_backup.ps1

# Check if I am in the correct folder!
if (Test-Path ".\Run_endpoint_backup.ps1" -eq $False){
  THROW "Wrong start folder, I need to be where the scrits are!"
  }

#Script Version and author
$sScriptVersion = "1.0"
$sScriptAuthor = "Linus Hellsing"

#Date
$today = Get-Date
#$today = $today.ToString("dddd (yyyy-MM-dd)")
$time = $today.ToString("yyyy-MM-dd-HH-mm-ss")
$today = $today.ToString("yyyy-MM-dd_dddd")


# Logging
. ".\Logging_Functions.ps1"
# Log File Info
$sLogPath = ".\log"
$sLogName = "Endpoint_backup_" + $time + ".log"
$sLogFile = $sLogPath + "\" + $sLogName

# Email and servers
$email = "my.email@mydomain.com"
$Emailfrom = "Senderaddress <veeamserver@mydomain.com>"
$Server = $env:computername
$Smtp = "mysmtp.server.com"

# File with execution dates
$History_file = ".\exec_history.txt"

Log-Start -LogPath $sLogPath -LogName $sLogName -ScriptVersion $sScriptVersion

###################################
# Start your engines!
###################################

# Get the history if existing, else create. Count todays good backups (max 30).
$StatusSuccess = 0
if (Test-Path $History_file -eq $True){
  Log-Write -LogPath $sLogFile -LineValue "Found history file $History_file"
  $History = (Get-Content $History_file)[-1 .. -30] | Foreach-Object {
    if ($_ -eq "$today 0") {$StatusSuccess = $StatusSuccess + 1}
    }
  }
Else{
  New-Item $History_file -type file
  Add-Content $History_file "This file is for keeping track of when backups have been created and their status. It was created: $today"
  }

Log-Write -LogPath $sLogFile -LineValue "Successful backups today: $StatusSuccess"

# Set a default result code
$LastExitCode = "999"

Log-Write -LogPath $sLogFile -LineValue "Starts backup of $Server as $env:username"
$Param = "/backup"
. "C:\Program Files\Veeam\Endpoint Backup\Veeam.EndPoint.Manager.exe" $Param
$DidItWork = $?
$Return_code = $LastExitCode
Log-Write -LogPath $sLogFile -LineValue "Result: $Return_code Did it work: $DidItWork"

# In case the Lastexitcode is unchanged, lets use diditwork
if ($Return_code -eq "999" ) {
  Log-Write -LogPath $sLogFile -LineValue "Result: $Return_code is unchanged. Uses this result instead: $DidItWork"
  if ($DidItWork -eq "True" ) {
    $Status = "a Success"
    $Detailed_status = "Backup successfully created"
    $Return_code = "0"
    }
  Else {
    $Status = "a failure of some kind"
    $Detailed_status = "Backup job failed to start or completed with error or was running"
    }
  }
Elseif ($Return_code -eq "0" ) {
  $Status = "a Success"
  $Detailed_status = "Backup successfully created"
  }
Elseif ($Return_code -eq "-1" ) {
  $Status = "a failure"
  $Detailed_status = "Backup job failed to start or completed with error"
  }
Elseif ($Return_code -eq "5" ) {
  $Status = "actually still in progress"
  $Detailed_status = "Backup job is currently running and cannot be started from the command line interface"
  }
Else {
  $Status = "... strange?"
  $Detailed_status = "I got a return code I didn't know about: $Return_code. Check this link for more info: http://helpcenter.veeam.com/endpoint/11/backup_cmd.html"
  }

Log-Write -LogPath $sLogFile -LineValue "Translation: the result was $Status"
Log-Write -LogPath $sLogFile -LineValue "$Detailed_status"

###################################
# Send HTML email
###################################


 $SmtpClient = new-object system.net.mail.smtpClient
 $mailmessage = New-Object system.net.mail.mailmessage
 $SmtpClient.Host = $Smtp
 $mailmessage.from = $Emailfrom
 $mailmessage.To.add($email)
 $mailmessage.Subject = "Backup of files on $Server was $Status"
 $mailmessage.IsBodyHtml = $true

 $mailmessage.Body = @"
<h3><font face=Calibri>Hi, </font></h3>
<h3><font face=Calibri>The file backup on <font color=red><strong>$Server</strong></font> has finished and it was <strong>$Status</strong></h3>
<h4>What does it mean?</h4>
Well, I don't really know, I'm just a script. <br />
Really.<br />
But I have learned a few things. And by using that enormous knowledge, I come to this conclusion:<br />
<br />
$Detailed_status <br />
<br />
All that only since I got this return code from the backup software: $Return_code<br />
BTW, I will only send one mail each day, unless I encounter problems.<br />
<br />
You might find more info about the return code here: <a href="http://helpcenter.veeam.com/endpoint/11/backup_cmd.html">Veeam help site</a>
Created: $today<br />
Executed as: $env:username
</font>
"@

# Send the mail only once per successful backup of the day or if it have failed
if ($StatusSuccess -eq "0") {
$smtpclient.Send($mailmessage)
Log-Write -LogPath $sLogFile -LineValue "Sends an email to $email. This is the first one or we have a problem."
}
elseif ($Return_code -ne "0") {
$smtpclient.Send($mailmessage)
Log-Write -LogPath $sLogFile -LineValue "Sends an email to $email. Problems!"
}

# Add this status on a new line
Add-Content $History_file "`n$today $Return_code"

###################################
# Delete old log files
###################################
$limit = (Get-Date).AddDays(-60)
$path = $sLogPath

Log-Write -LogPath $sLogFile -LineValue "Delete files older than $limit"

# Delete files older than the $limit.
Get-ChildItem -Path $path -Recurse -Force | Where-Object { !$_.PSIsContainer -and $_.CreationTime -lt $limit } | Remove-Item -Force

## Delete any empty directories left behind after deleting the old files.
#Get-ChildItem -Path $path -Recurse -Force | Where-Object { $_.PSIsContainer -and (Get-ChildItem -Path $_.FullName -Recurse -Force | Where-Object { !$_.PSIsContainer }) -eq $null } | Remove-Item -Force -Recurse

Log-Finish -LogPath $sLogFile

# END


Edit: Forgot about the "ExecutionPolicy".
LinusH
Novice
 
Posts: 7
Liked: 2 times
Joined: Mon Feb 09, 2015 8:32 am
Full Name: Linus Hellsing

Previous

Return to Veeam Agent for Windows



Who is online

Users browsing this forum: No registered users and 10 guests