PowerShell script exchange
Post Reply
sasilik
Expert
Posts: 104
Liked: 13 times
Joined: Jun 12, 2014 11:01 am
Full Name: Markko Meriniit
Contact:

Can't add files to tape job via powershell

Post by sasilik »

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
Expert
Posts: 104
Liked: 13 times
Joined: Jun 12, 2014 11:01 am
Full Name: Markko Meriniit
Contact:

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

Post by sasilik »

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
Expert
Posts: 104
Liked: 13 times
Joined: Jun 12, 2014 11:01 am
Full Name: Markko Meriniit
Contact:

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

Post by sasilik »

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
veremin
Product Manager
Posts: 20415
Liked: 2302 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

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

Post by veremin »

Seems like a current limitation of PS cmdlet; we will double check that. Thanks for letting us know.
tsightler
VP, Product Management
Posts: 6035
Liked: 2860 times
Joined: Jun 05, 2009 12:57 pm
Full Name: Tom Sightler
Contact:

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

Post by tsightler »

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?
sasilik
Expert
Posts: 104
Liked: 13 times
Joined: Jun 12, 2014 11:01 am
Full Name: Markko Meriniit
Contact:

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

Post by sasilik »

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.
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests