Can't add files to tape job via powershell

PowerShell script exchange

Can't add files to tape job via powershell

Veeam Logoby sasilik » Tue May 16, 2017 11:18 am

Can't understand why adding vbk file with powershell and with New-VBRFileToTapeObject displays error message "Path does not exist". Path is for example "\\server\data\col1\veeam\VeeamBackup\job1\server.vbk". If i put this to variable $vbk = "\\server\data\col1\veeam\VeeamBackup\job1\server.vbk" then I can do in powershell "dir $vbk" and it displays file name. I can add this file manually on VEEAM management console to tape backup job. But if I do
$NewFile = New-VBRFileToTapeObject -Path $vbk -Server $BServer -Credentials $cred
then I get error message - New-VBRFileToTapeObject: Path "\\server\data\col1\veeam\VeeamBackup\job1\server.vbk" does not exist.
I tried also different path and I can add path "\\server\data\col1\veeam\VeeamBackup" but I can't add "\\server\data\col1\veeam\VeeamBackup\job1".
If this is permission problem then I don't get what permissions are needed for New-VBRFileToTapeObject . Or what else can be wrong. Out of ideas right now.
sasilik
Enthusiast
 
Posts: 34
Liked: 1 time
Joined: Thu Jun 12, 2014 11:01 am
Full Name: Markko Meriniit

Re: Can't add files to tape job via powershell

Veeam Logoby sasilik » Tue May 16, 2017 12:24 pm

It has something to do with share being NFS share but I can't figure out what. If I snooped network traffic with wireshark then I saw that file information was returned but cmdlet still displayed error message. As I wanted to get backup job working then I switched to CIFS share which works.
sasilik
Enthusiast
 
Posts: 34
Liked: 1 time
Joined: Thu Jun 12, 2014 11:01 am
Full Name: Markko Meriniit

Re: Can't add files to tape job via powershell

Veeam Logoby sasilik » Wed May 17, 2017 9:27 am

Short version:
works - Get-Childitem "\\server\data\col1\veeam\VeeamBackup\job1\server.vbk"
works - Adding "\\server\data\col1\veeam\VeeamBackup\job1\server.vbk" to job with VEEAM GUI
not working - New-VBRFileToTapeObject -Path "\\server\data\col1\veeam\VeeamBackup\job1\server.vbk" -Server $BServer -Credentials $cred
sasilik
Enthusiast
 
Posts: 34
Liked: 1 time
Joined: Thu Jun 12, 2014 11:01 am
Full Name: Markko Meriniit

Re: Can't add files to tape job via powershell

Veeam Logoby v.Eremin » Thu Jun 01, 2017 4:43 pm

Seems like a current limitation of PS cmdlet; we will double check that. Thanks for letting us know.
v.Eremin
Veeam Software
 
Posts: 13709
Liked: 1026 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Can't add files to tape job via powershell

Veeam Logoby tsightler » Thu Jun 01, 2017 9:25 pm

sasilik wrote:It has something to do with share being NFS share but I can't figure out what. If I snooped network traffic with wireshark then I saw that file information was returned but cmdlet still displayed error message. As I wanted to get backup job working then I switched to CIFS share which works.


Can you clarify what you mean by this? As far as I know Veeam does not support native NFS shares so I wouldn't really expect this to work at all, although, since Windows does have some native support for this, that might be why it is working via the GUI. When you add the share via the GUI, does Veeam prompt you for credentials when you click next or does it proceed through the wizard without prompting for anything?
tsightler
Veeam Software
 
Posts: 4872
Liked: 1821 times
Joined: Fri Jun 05, 2009 12:57 pm
Full Name: Tom Sightler

Re: Can't add files to tape job via powershell

Veeam Logoby sasilik » Tue Jun 13, 2017 3:38 pm

tsightler wrote:Can you clarify what you mean by this? As far as I know Veeam does not support native NFS shares so I wouldn't really expect this to work at all, although, since Windows does have some native support for this, that might be why it is working via the GUI. When you add the share via the GUI, does Veeam prompt you for credentials when you click next or does it proceed through the wizard without prompting for anything?

Tried with GUI and it didn't prompt for credentials. Its kind of confusing problem because I can backup files from other NFS share and add them via powershell to backup job. Problem was with Datadomain mtree which was shared out both with NFS and CIFS. But as I checked out now then some other files I back up via NFS are on mtree's which also have both shares, NFS and CIFS. And as I remember I could add upper level folder via powershell but when I went little deeper, to job folder and vbk files then I got access denied error. Weird and confusing situation.
sasilik
Enthusiast
 
Posts: 34
Liked: 1 time
Joined: Thu Jun 12, 2014 11:01 am
Full Name: Markko Meriniit


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 1 guest