VTLReplicationSettings.ps1 in VTL Free - parameters

StarWind VTL, VTL Free, VTL Appliance

Moderators: anton (staff), art (staff), Max (staff), Anatoly (staff)

Roman L
Posts: 8
Joined: Wed May 25, 2022 1:52 pm

Wed May 25, 2022 2:17 pm

Hi,
Trying to configure replication to Azure in VTL Free and couldn`t find detailed description on the parameters in the script. Maybe community can help?

Need to upload tapes immediately to Archive storage (no hot or cold storage). I have Azure Blob container prepared and have following info:
account name, key, container name, folder name. Not sure where to put these.

Here`s what`s in the script:

$deviceName="VTL1",
$target=16, ---- 16 for Azure??
$accessKey="key", ----- Access key??
$secretAccessKey="YourSecretKey", ----- what do I put here??
$regionName="public", ----- is this correct??
$containerName="name", ----- container name
$keepLocal=0, ----- no need to keep local
$keepInCloud=-1,
$keepInStorage1=0, ----- do not keep in hot - is this correct??
$keepInStorage2=0, ----- do not keep in cool - is this correct??
$delayBeforeStart=0,
$serviceUrl="",
$createTapeOnExport=0


I would be appreciative for your advise.
Roman L
Posts: 8
Joined: Wed May 25, 2022 1:52 pm

Tue May 31, 2022 2:04 pm

Yaroslav,
I have read those posts and need some clarification:

$secretAccessKey="YourSecretKey", as I understand - this is not being used for Azure - correct?

I couldn`t find a definite answer here - different value in different discussions - some use $regionName="public", some use East US or us-east-1 - what should I use?

If I want to save directly to archive storage, bypassing hot and cold storage, what are the correct values to put here below?

$keepInStorage1=0,
$keepInStorage2=0,

Thank you.
yaroslav (staff)
Staff
Posts: 2360
Joined: Mon Nov 18, 2019 11:11 am

Tue May 31, 2022 10:16 pm

$secretAccessKey="YourSecretKey", as I understand - this is not being used for Azure - correct?
You are right.
I couldn`t find a definite answer here - different value in different discussions - some use $regionName="public", some use East US or us-east-1 - what should I use?
It depends on the cloud provider you are using and the account settings. us-east-1 should be OK.
If I want to save directly to archive storage, bypassing hot and cold storage, what are the correct values to put here below?
Yes, you are right. Some hints:
For S3 only KeepInStorage1 parameter is working, it is the time of keeping on S3, after this time expiration the data is moving to Glacier
For Azure KeepInStorage1 is the time of keeping data on Hot till the moment of moving to Cold, KeepInStorage2that is the time of keeping data on Cold till moving to Archive.
Roman L
Posts: 8
Joined: Wed May 25, 2022 1:52 pm

Wed Jun 01, 2022 1:03 pm

So after running the script I get following output:


Name : vtl1
DeviceType : VTL
DeviceId : 0x0000014B7BB03040
File :
TargetName : iqn.2008-08.com.starwindsoftware:******************-targetvtl1
TargetId : 0x0000014B7C06CAC0
Size : 0
CacheMode : empty
CacheSize : empty
CacheBlockExpiryPeriod : empty
Exists : True
DeviceLUN : 0
IsSnapshotsSupported : False
Snapshots :
SectorSize :
State : 0
Parent :
Tapes : System.__ComObject
AvailableSlots : 95
TransportSlots : 1
DriveSlots : 4
ImportExportSlots : 3
StorageSlots : 96
Slots : System.__ComObject
ReplicationSettings : System.__ComObject
DriveType : 8

Target : 0
AccessKey :
SecretAccessKey :
RegionName :
ContainerName :
KeepLocal : -1
KeepInCloud : -1
KeepInStorage1 : -1
KeepInStorage2 : -1
DelayBeforeStart : -1
ServiceUrl :
CreateTapeOnExport : False

107
107
Target : 2
AccessKey :
SecretAccessKey :
RegionName :
ContainerName :
KeepLocal : -1
KeepInCloud : -1
KeepInStorage1 : -1
KeepInStorage2 : 1
DelayBeforeStart : 0
ServiceUrl :
CreateTapeOnExport : False





Which does not reflect the changes I am trying to apply in the script.




And here`s my script:

param($addr="127.0.0.1", $port=3261, $user="root", $password="starwind",
$deviceName="vtl1",
$target=16,
$accessKey="****************************************",
$secretAccessKey="",
$regionName="us-east-1",
$containerName="***************************",
$keepLocal=0,
$keepInCloud=-1,
$keepInStorage1=0,
$keepInStorage2=0,
$delayBeforeStart=0,
$serviceUrl="",
$createTapeOnExport=0
)

Import-Module StarWindX

$server = New-SWServer $addr $port $user $password

try
{
$server.Connect()

$device = $null

foreach($dev in $server.Devices)
{

if( $dev.Name.Equals($deviceName) -and $dev.DeviceType.Equals("VTL") )
{
$device = $dev
break
}
}

if( !$device )
{
Write-Host "Device '$($deviceName)' not found" -foreground red
return
}

$device

$settings = new-object -ComObject StarWindX.VTLReplicationSettings
$settings

$settings.Target=$target
$settings.AccessKey=$accessKey
$settings.SecretAccessKey=$secretAccessKey
$settings.RegionName=$regionName
$settings.ContainerName=$containerName
$settings.KeepLocal=$keepLocal
$settings.KeepInCloud=$keepInCloud
$settings.KeepInStorage1=$keepInStorage1
$settings.KeepInStorage2=$keepInStorage2
$settings.DelayBeforeStart=$delayBeforeStart
$settings.ServiceUrl=$serviceUrl
$settings.CreateTapeOnExport=$createTapeOnExport

$res = $device.CheckReplicationCredentials($settings)
$res
$res = $device.ApplyReplicationSettings($settings)
$res
$device.ReplicationSettings

#$tapeName = "SWXXXXXX"
#$device.UploadTape($tapeName)
#$device.DownloadTape($tapeName)

}
catch
{
Write-Host $_ -foreground red
}
finally
{
$server.Disconnect()
}




Can you please advise?
Thanks.
yaroslav (staff)
Staff
Posts: 2360
Joined: Mon Nov 18, 2019 11:11 am

Mon Jun 06, 2022 3:57 pm

Hi,

Small update: there is a limitation that does not allow you to send the data straight to the archival tier. Sincere apologies for misleading you.
We are working on the solution. Please try offloading with 1 for each tier but archival.
Roman L
Posts: 8
Joined: Wed May 25, 2022 1:52 pm

Tue Jun 07, 2022 1:19 pm

I wanted to upload straight to Archive to avoid higher charges.
When is this functionality expected to be available?
Thanks
yaroslav (staff)
Staff
Posts: 2360
Joined: Mon Nov 18, 2019 11:11 am

Fri Jun 10, 2022 9:42 am

Roman,

Please let me discuss this with my colleagues. Will update you soon.
UPD: Yes, there is a way. I will share the script prior to the next Wed.

Thanks for your question anyway!
yaroslav (staff)
Staff
Posts: 2360
Joined: Mon Nov 18, 2019 11:11 am

Thu Jun 16, 2022 9:59 am

Hi,

Script modifications are undergoing tests. Please stay tuned!
Roman L
Posts: 8
Joined: Wed May 25, 2022 1:52 pm

Thu Jun 16, 2022 10:26 pm

Waiting for the update :)
yaroslav (staff)
Staff
Posts: 2360
Joined: Mon Nov 18, 2019 11:11 am

Mon Jun 20, 2022 6:09 am

Set $keepInStorage value for both to -2.
Attachments
script
script
image.png (30.05 KiB) Viewed 8477 times
Roman L
Posts: 8
Joined: Wed May 25, 2022 1:52 pm

Mon Jun 20, 2022 1:01 pm

Thanks!
Tweaked the script and after running it I get the output below. As you can see it does not reflect any changes.. How can I verify current settings?

Name : vtl1
DeviceType : VTL
DeviceId : 0x0000012CF060F640
File :
TargetName : iqn.2008-08.com.starwindsoftware:veeam.carydev.local-targetvtl1
TargetId : 0x0000012CF064DE00
Size : 0
CacheMode : empty
CacheSize : empty
CacheBlockExpiryPeriod : empty
Exists : True
DeviceLUN : 0
IsSnapshotsSupported : False
Snapshots :
SectorSize :
State : 0
Parent :
Tapes : System.__ComObject
AvailableSlots : 95
TransportSlots : 1
DriveSlots : 4
ImportExportSlots : 3
StorageSlots : 96
Slots : System.__ComObject
ReplicationSettings : System.__ComObject
DriveType : 8

Target : 0
AccessKey :
SecretAccessKey :
RegionName :
ContainerName :
KeepLocal : -1
KeepInCloud : -1
KeepInStorage1 : -1
KeepInStorage2 : -1
DelayBeforeStart : -1
ServiceUrl :
CreateTapeOnExport : False

107
107
Target : 2
AccessKey :
SecretAccessKey :
RegionName :
ContainerName :
KeepLocal : -1
KeepInCloud : -1
KeepInStorage1 : -1
KeepInStorage2 : 1
DelayBeforeStart : 0
ServiceUrl :
CreateTapeOnExport : False
yaroslav (staff)
Staff
Posts: 2360
Joined: Mon Nov 18, 2019 11:11 am

Mon Jun 20, 2022 1:35 pm

Greetings Roman,

Just to make sure we are on the same page. Setting -2 still provides the output of -1?
Roman L
Posts: 8
Joined: Wed May 25, 2022 1:52 pm

Mon Jun 20, 2022 1:42 pm

Correct,
This is the script:

$deviceName="vtl1",
$target=16,
$accessKey="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
$secretAccessKey="",
$regionName="us-east-1",
$containerName="XXXXXXXXXXXXXXXXXXX",
$keepLocal=0,
$keepInCloud=-1,
$keepInStorage1=-2,
$keepInStorage2=-2,
$delayBeforeStart=0,
$serviceUrl="",
$createTapeOnExport=0

and the output was posted previously.
yaroslav (staff)
Staff
Posts: 2360
Joined: Mon Nov 18, 2019 11:11 am

Tue Jun 21, 2022 8:45 am

Thanks for your update. We will check this internally. Can I have the StarWindService and Cloud Replicator logs, please? Send them via Google Disk, OneDrive, Sharepoint, or any other convenient service.
Post Reply