Start Veeam SOBR job

How to start Veeam SOBR job? Note: this is for Veeam version 9.5 update 4 / 4a. If you are using a scale out repository with Veeam and have setup that repository with object cloud storage, then you may notice a SOBR tiering job. This job will periodically run every four hours.

Veeam SOBR Tiering job running

I found out that there is a Powershell command built in that will allow you to start Veeam SOBR job. It is clearly listed on Veeam’s help site.

Finally, here is the Powershell command(s) that I used to initiate a SOBR Tiering job.

Add-PSSnapin VeeamPSSnapin
$repository = Get-VBRBackupRepository -ScaleOut
Start-VBRCapacityTierSync -Repository $repository
powershell initiate SOBR tiering job

After the job runs the output looks like this:

powershell SOBR tiering job result.

Some quick notes.

  • The job will only push incremental and full backups to your capacity tier once the files are not primary in the scale out repository. These would be the ‘father’ or ‘grandfather’ tier backup files.
  • You set how long the backup files stay in the local scale out repositories in the settings for the scale out repository.
  • Even if you set the local retention for one day, the SOBR Tiering job will not necessarily offload. Veeam waits until the old backups have a separate full backup.
  • Selecting “Active Full” does not count towards the father, grandfather retention. Veeam must initiate the full backup itself based on the backup or backup copy job settings.
  • This post is intended for Veeam version 9.5 update 4 / 4a. Veeam could change the caveats and features in future releases.

Check out my previous post on Veeam here.

Find out more about Veeam and capacity tier information here.

Create PowerShell TicTacToe Game

Boredom induces the need to keep my mind busy. Imagine being stuck in a place with access to only a basic windows 10 workstation and heavily content filtered internet. Luckily, PowerShell is still enabled on the workstation. So you decide to spend your time creating a PowerShell TicTacToe game to pass the time.

Caveats and Warnings

This PowerShell TicTacToe game took me total 6 hours to research (Google search all the code formats) and put together. Warning, I tested it sparingly and I missed following basic coding best practices.

Looking back at my work there are areas of code that need to be shortened and more comments. Secondly, I prefer to consolidate code with numerous method calls instead of repeating code lines. However, for a small project that occupied my thoughts and passed the time, to small project was enjoyable.

PowerShell TicTacToe game source code

<# Tic Tac Toe Game
Created by powersjo. 
#>

Add-Type -AssemblyName System.Windows.Forms
[System.Windows.Forms.Application]::EnableVisualStyles()

$Path = "$Home\Documents"
if(!(Test-Path -Path $Path\TicTacToe)){
    New-Item -Name TicTacToe -Path $Path -ItemType Directory    
}
if(!(Test-Path -Path $Path\TicTacToe\Board)){
    New-Item -Name Board -Path $Path\TicTacToe -ItemType Directory    
}
if(!(Test-Path -Path $Path\TicTacToe\Board\1.txt)){
    New-Item $Path\TicTacToe\Board -ItemType file -Name 1.txt
}
if(!(Test-Path -Path $Path\TicTacToe\Board\2.txt)){
    New-Item $Path\TicTacToe\Board -ItemType file -Name 2.txt
}
if(!(Test-Path -Path $Path\TicTacToe\Board\3.txt)){
    New-Item $Path\TicTacToe\Board -ItemType file -Name 3.txt
}
if(!(Test-Path -Path $Path\TicTacToe\Board\4.txt)){
    New-Item $Path\TicTacToe\Board -ItemType file -Name 4.txt
}
if(!(Test-Path -Path $Path\TicTacToe\Board\5.txt)){
    New-Item $Path\TicTacToe\Board -ItemType file -Name 5.txt
}
if(!(Test-Path -Path $Path\TicTacToe\Board\6.txt)){
    New-Item $Path\TicTacToe\Board -ItemType file -Name 6.txt
}
if(!(Test-Path -Path $Path\TicTacToe\Board\7.txt)){
    New-Item $Path\TicTacToe\Board -ItemType file -Name 7.txt
}
if(!(Test-Path -Path $Path\TicTacToe\Board\8.txt)){
    New-Item $Path\TicTacToe\Board -ItemType file -Name 8.txt
}
if(!(Test-Path -Path $Path\TicTacToe\Board\9.txt)){
    New-Item $Path\TicTacToe\Board -ItemType file -Name 9.txt
}
if(!(Test-Path -Path $Path\TicTacToe\player.txt)){
    New-Item $Path\TicTacToe -ItemType file -Name player.txt
}

Set-Content $Path\TicTacToe\player.txt '1'
Set-Content $Path\TicTacToe\Board\1.txt '0'
Set-Content $Path\TicTacToe\Board\2.txt '0'
Set-Content $Path\TicTacToe\Board\3.txt '0'
Set-Content $Path\TicTacToe\Board\4.txt '0'
Set-Content $Path\TicTacToe\Board\5.txt '0'
Set-Content $Path\TicTacToe\Board\6.txt '0'
Set-Content $Path\TicTacToe\Board\7.txt '0'
Set-Content $Path\TicTacToe\Board\8.txt '0'
Set-Content $Path\TicTacToe\Board\9.txt '0'

$Form                            = New-Object system.Windows.Forms.Form
$Form.ClientSize                 = '380,290'
$Form.text                       = "Form"
$Form.TopMost                    = $false

$Button1                         = New-Object system.Windows.Forms.Button
$Button1.text                    = ""
$Button1.width                   = 30
$Button1.height                  = 30
$Button1.location                = New-Object System.Drawing.Point(115,64)
$Button1.Font                    = 'Microsoft Sans Serif,10'

$Button2                         = New-Object system.Windows.Forms.Button
$Button2.text                    = ""
$Button2.width                   = 30
$Button2.height                  = 30
$Button2.location                = New-Object System.Drawing.Point(187,64)
$Button2.Font                    = 'Microsoft Sans Serif,10'

$Button3                         = New-Object system.Windows.Forms.Button
$Button3.text                    = ""
$Button3.width                   = 30
$Button3.height                  = 30
$Button3.location                = New-Object System.Drawing.Point(260,64)
$Button3.Font                    = 'Microsoft Sans Serif,10'

$Button4                         = New-Object system.Windows.Forms.Button
$Button4.text                    = ""
$Button4.width                   = 30
$Button4.height                  = 30
$Button4.location                = New-Object System.Drawing.Point(115,111)
$Button4.Font                    = 'Microsoft Sans Serif,10'

$Button5                         = New-Object system.Windows.Forms.Button
$Button5.text                    = ""
$Button5.width                   = 30
$Button5.height                  = 30
$Button5.location                = New-Object System.Drawing.Point(187,111)
$Button5.Font                    = 'Microsoft Sans Serif,10'

$Button6                         = New-Object system.Windows.Forms.Button
$Button6.text                    = ""
$Button6.width                   = 30
$Button6.height                  = 30
$Button6.location                = New-Object System.Drawing.Point(260,111)
$Button6.Font                    = 'Microsoft Sans Serif,10'

$Button7                         = New-Object system.Windows.Forms.Button
$Button7.text                    = ""
$Button7.width                   = 30
$Button7.height                  = 30
$Button7.location                = New-Object System.Drawing.Point(260,157)
$Button7.Font                    = 'Microsoft Sans Serif,10'

$Button8                         = New-Object system.Windows.Forms.Button
$Button8.text                    = ""
$Button8.width                   = 30
$Button8.height                  = 30
$Button8.location                = New-Object System.Drawing.Point(187,157)
$Button8.Font                    = 'Microsoft Sans Serif,10'

$Button9                         = New-Object system.Windows.Forms.Button
$Button9.text                    = ""
$Button9.width                   = 30
$Button9.height                  = 30
$Button9.location                = New-Object System.Drawing.Point(115,157)
$Button9.Font                    = 'Microsoft Sans Serif,10'

$Button10                        = New-Object system.Windows.Forms.Button
$Button10.text                   = "reset"
$Button10.width                  = 60
$Button10.height                 = 30
$Button10.location               = New-Object System.Drawing.Point(186,207)
$Button10.Font                   = 'Microsoft Sans Serif,10'

$Label1                        = New-Object System.Windows.Forms.Label
$Label1.text                   = "Turn: Player 1"
$Label1.width                  = 60
$Label1.height                 = 30
$Label1.location               = New-Object System.Drawing.Point(10,10)
$Label1.Font                   = 'Microsoft Sans Serif,10'

$Form.controls.AddRange(@($Button1,$Button2,$Button3,$Button4,$Button5,$Button6,$Button7,$Button8,$Button9,$Button10,$Label1))

$Button10.Add_Click({
    Set-Content $Path\TicTacToe\player.txt '1'
    Set-Content $Path\TicTacToe\Board\1.txt '0'
    Set-Content $Path\TicTacToe\Board\2.txt '0'
    Set-Content $Path\TicTacToe\Board\3.txt '0'
    Set-Content $Path\TicTacToe\Board\4.txt '0'
    Set-Content $Path\TicTacToe\Board\5.txt '0'
    Set-Content $Path\TicTacToe\Board\6.txt '0'
    Set-Content $Path\TicTacToe\Board\7.txt '0'
    Set-Content $Path\TicTacToe\Board\8.txt '0'
    Set-Content $Path\TicTacToe\Board\9.txt '0'
    $Button1.Text = ""
    $Button2.Text = ""
    $Button3.Text = ""
    $Button4.Text = ""
    $Button5.Text = ""
    $Button6.Text = ""
    $Button7.Text = ""
    $Button8.Text = ""
    $Button9.Text = ""
    $Label1.Text = "Turn: Player 1"
})

function Cycle-Player{
    $tempPlayer = Get-Content $Path\TicTacToe\player.txt 
    if($tempPlayer -eq 1){
        Set-Content $Path\TicTacToe\player.txt '2'
        $Label1.Text = "Turn: Player 2"
    }
    else{
        Set-Content $Path\TicTacToe\player.txt '1'
        $Label1.Text = "Turn: Player 1"
    }
}

$Button1.Add_Click({
$tempPlayer = Get-Content $Path\TicTacToe\player.txt 
$tempSpot = Get-Content $Path\TicTacToe\Board\1.txt
    if($tempSpot -eq 0){
        if($tempPlayer -eq 1){
            $Button1.Text = "X"
            Set-Content $Path\TicTacToe\Board\1.txt '1'
        }
        ElseIf($tempPlayer -eq 2){
            $Button1.Text = "O"
            Set-Content $Path\TicTacToe\Board\1.txt '2'
        }
        Cycle-Player
    }
})

$Button2.Add_Click({
$tempPlayer = Get-Content $Path\TicTacToe\player.txt 
$tempSpot = Get-Content $Path\TicTacToe\Board\2.txt
    if($tempSpot -eq 0){
        switch ($tempPlayer){
            1{
                $Button2.Text = "X"
                Set-Content $Path\TicTacToe\Board\2.txt '1'
            }
            2{
                $Button2.Text = "O"
                Set-Content $Path\TicTacToe\Board\2.txt '2'
            }
        }
        Cycle-Player
    }
})

$Button3.Add_Click({
$tempPlayer = Get-Content $Path\TicTacToe\player.txt 
$tempSpot = Get-Content $Path\TicTacToe\Board\3.txt
    if($tempSpot -eq 0){
        switch ($tempPlayer){
            1{
                $Button3.Text = "X"
                Set-Content $Path\TicTacToe\Board\3.txt '1'
            }
            2{
                $Button3.Text = "O"
                Set-Content $Path\TicTacToe\Board\3.txt '2'
            }
        }
        Cycle-Player
    }
})

$Button4.Add_Click({
$tempPlayer = Get-Content $Path\TicTacToe\player.txt 
$tempSpot = Get-Content $Path\TicTacToe\Board\4.txt
    if($tempSpot -eq 0){
        switch ($tempPlayer){
            1{
                $Button4.Text = "X"
                Set-Content $Path\TicTacToe\Board\4.txt '1'
            }
            2{
                $Button4.Text = "O"
                Set-Content $Path\TicTacToe\Board\4.txt '2'
            }
        }
        Cycle-Player
    }
})

$Button5.Add_Click({
$tempPlayer = Get-Content $Path\TicTacToe\player.txt 
$tempSpot = Get-Content $Path\TicTacToe\Board\5.txt
    if($tempSpot -eq 0){
        switch ($tempPlayer){
            1{
                $Button5.Text = "X"
                Set-Content $Path\TicTacToe\Board\5.txt '1'
            }
            2{
                $Button5.Text = "O"
                Set-Content $Path\TicTacToe\Board\5.txt '2'
            }
        }
        Cycle-Player
    }
})

$Button6.Add_Click({
$tempPlayer = Get-Content $Path\TicTacToe\player.txt 
$tempSpot = Get-Content $Path\TicTacToe\Board\6.txt
    if($tempSpot -eq 0){
        switch ($tempPlayer){
            1{
                $Button6.Text = "X"
                Set-Content $Path\TicTacToe\Board\6.txt '1'
            }
            2{
                $Button6.Text = "O"
                Set-Content $Path\TicTacToe\Board\6.txt '2'
            }
        }
        Cycle-Player
    }
})

$Button7.Add_Click({
$tempPlayer = Get-Content $Path\TicTacToe\player.txt 
$tempSpot = Get-Content $Path\TicTacToe\Board\7.txt
    if($tempSpot -eq 0){
        switch ($tempPlayer){
            1{
                $Button7.Text = "X"
                Set-Content $Path\TicTacToe\Board\7.txt '1'
            }
            2{
                $Button7.Text = "O"
                Set-Content $Path\TicTacToe\Board\7.txt '2'
            }
        }
        Cycle-Player
    }
})

$Button8.Add_Click({
$tempPlayer = Get-Content $Path\TicTacToe\player.txt 
$tempSpot = Get-Content $Path\TicTacToe\Board\8.txt
    if($tempSpot -eq 0){
        switch ($tempPlayer){
            1{
                $Button8.Text = "X"
                Set-Content $Path\TicTacToe\Board\8.txt '1'
            }
            2{
                $Button8.Text = "O"
                Set-Content $Path\TicTacToe\Board\8.txt '2'
            }
        }
        Cycle-Player
    }
})

$Button9.Add_Click({
$tempPlayer = Get-Content $Path\TicTacToe\player.txt 
$tempSpot = Get-Content $Path\TicTacToe\Board\9.txt
    if($tempSpot -eq 0){
        switch ($tempPlayer){
            1{
                $Button9.Text = "X"
                Set-Content $Path\TicTacToe\Board\9.txt '1'
            }
            2{
                $Button9.Text = "O"
                Set-Content $Path\TicTacToe\Board\9.txt '2'
            }
        }
        Cycle-Player
    }
})

$Form.ShowDialog()

In conclusion, the end product is very bare bones. The featured image above gives a screenshot of the finished product. Additionally, feel free to copy and use or improve or disregard the code. Finally, just consider the work an open source contribution to the internet. Thanks for reading.

If you want to check out my previous blog post on code / scripting click here.

If you want to read a different topic try any of my book reviews.

Most of the help I found online was located here at StackOverflow.

Veeam Capacity Tier Unsupported legacy data block format

While working with Veeam version 9.5 update 4, I wanted to setup a scaling repository to Amazon AWS. The backups would be stored locally first then scale out to the cloud once they got too old. I had existing backups and wanted to test my new configuration. Following this guide from Veeam here, I initiated the transfer to AWS but got this error: Capacity Tier Unsupported legacy data block format.

I found out these backups I wanted to move to the capacity tier were created with Veeam Backup and Replication 9.5 version 9.5.0.823, note they were previous backups on an older version. The job was reverse incremental and set for optimal compression. In order to use the capacity tier with Amazon AWS you have to update to Veeam version 9.5 update 4.

After Updates

I updated to 9.5 update 4 AND changed the compression level to extreme. It was then when I followed the Veeam help center guide above that I got the error: Capacity Tier Unsupported legacy data block format. This was only when the full backup was getting moved to AWS. The incremental backups moved to AWS fine.

After a support case I created a new full backup set with extreme compression using the new Veeam 9.5 update 4 version. Then, following that guide above the full backup file moved to AWS fine. No issues.

The moral of the story is to keep your backup chain the same format as much as possible. Full backups and incremental backups with the same compression and Veeam version. If you do that you should not run into any mismatch legacy block data issues.

Thank you, you can check out my last Veeam blog post here.

How to enable copy paste in a VMware console

isolation.tools.copy.disable     false
isolation.tools.paste.disable    false

First off, this process is easy and most of the time you don’t even need to do enable this feature. However, during my day to day I have found it helpful when managing vms to enable copy / paste in the built-in console of VMware.

Second, this is not new. This functionality has been around at least since vsphere 4.x. Case and point, just check out VMware’s online publication here. So why blog about it? Syntax. I keep forgetting the exact name in the parameters to enable copy / paste. I’m writing about to help me remember and to have an easy reference for the future.

How To:

Log into VMware vCenter or ESXi directly > right click on a vm and select ‘Edit Settings’. Select ‘VM Options’

Edit VM settings > VM Options tab” class=”wp-image-445″/></figure>



<figure class=

Above, in VM Options expand ‘Advanced’ and select ‘Edit Configuration’

Below, in the Configuration Parameters click ‘Add parameter’ and enter the following for the key and value:

(Note: you will have to ‘Add parameter’ twice)

Name / KeyValue
isolation.tools.copy.disable false
isolation.tools.paste.disable false

You may have to restart your vm for the change to take effect. You should now be able to copy paste in a VMware console onto your vm.

Check out my other tech blog posts here.

Veeam Backup Service wont Start

Have you ever installed a new Veeam Backup server but then Veeam won’t start? 

I ran into this issue recently can got the error ‘The Veeam Backup Service service on Local Computer started and then stopped. Some services stop automatically if they are not in use by other services or programs.’ However, this does not make sense because the main Veeam backup service needs to run. The first thing I thought to check was the event logs.  I found this:

veeam event viewer error

Veeam wont start and it seemed to be a database issue. However this was a brand new Veeam server and was using a fresh SQL instance. I re-traced the steps I took to configure the server and the last thing I did was add the server to the domain and rebooted. 

After some web searches I found and option to check the registry. Apparently sometimes Veeam doesn’t update if you install Veeam before you add the server to the domain. 

regedit search

First go to HKEY_LOCAL_MACHINE > SOFTWARE > Veeam > Veeam Backup and Replication and verify that SqlServerName is correct and not some random windows generated name.

regedit sql server name

Second go to HKEY_LOCAL_MACHINE > SOFTWARE > Veeam > Veeam Backup Catalog and verify the CatalogSharedFolderPath is correct. 

regedit veeam catalogsharedfolderpath

After that the service should start up like normal. Now the event log about the database issue makes sense because of the registry setting for the SQL server name. I hope this saved you some trouble in case Veeam wont start. 

Check out my Veeam Engineer Study guide here.