-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test-Connection fails #9
Comments
I think it’s an easy one to address. I’ll look into it this week.
…On Sun, Feb 16, 2020 at 3:41 PM rawtaz ***@***.***> wrote:
I've followed the installation instructions and am running stuff as an
administrator, but noticed that the scheduled task didn't start properly.
Turned out that it's due to this (the following is from a manual run in an
administrator PS shell, to see the errors):
PS C:\restic> .\backup.ps1
Test-Connection : Cannot validate argument on parameter 'ComputerName'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.
At C:\restic\backup.ps1:235 char:42
+ elseif(!(Test-Connection -Server $repository_host -Quiet)) {
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Test-Connection], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.TestConnectionCommand
Test-Connection : Cannot validate argument on parameter 'ComputerName'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.
At C:\restic\backup.ps1:235 char:42
+ elseif(!(Test-Connection -Server $repository_host -Quiet)) {
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Test-Connection], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.TestConnectionCommand
Test-Connection : Cannot validate argument on parameter 'ComputerName'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.
At C:\restic\backup.ps1:235 char:42
+ elseif(!(Test-Connection -Server $repository_host -Quiet)) {
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Test-Connection], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.TestConnectionCommand
Test-Connection : Cannot validate argument on parameter 'ComputerName'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.
At C:\restic\backup.ps1:235 char:42
+ elseif(!(Test-Connection -Server $repository_host -Quiet)) {
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Test-Connection], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.TestConnectionCommand
Test-Connection : Cannot validate argument on parameter 'ComputerName'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.
At C:\restic\backup.ps1:235 char:42
+ elseif(!(Test-Connection -Server $repository_host -Quiet)) {
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Test-Connection], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.TestConnectionCommand
Test-Connection : Cannot validate argument on parameter 'ComputerName'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.
At C:\restic\backup.ps1:235 char:42
+ elseif(!(Test-Connection -Server $repository_host -Quiet)) {
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Test-Connection], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.TestConnectionCommand
Test-Connection : Cannot validate argument on parameter 'ComputerName'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.
At C:\restic\backup.ps1:235 char:42
+ elseif(!(Test-Connection -Server $repository_host -Quiet)) {
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Test-Connection], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.TestConnectionCommand
Test-Connection : Cannot validate argument on parameter 'ComputerName'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.
At C:\restic\backup.ps1:235 char:42
+ elseif(!(Test-Connection -Server $repository_host -Quiet)) {
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Test-Connection], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.TestConnectionCommand
Test-Connection : Cannot validate argument on parameter 'ComputerName'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.
At C:\restic\backup.ps1:235 char:42
+ elseif(!(Test-Connection -Server $repository_host -Quiet)) {
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Test-Connection], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.TestConnectionCommand
Test-Connection : Cannot validate argument on parameter 'ComputerName'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.
At C:\restic\backup.ps1:235 char:42
+ elseif(!(Test-Connection -Server $repository_host -Quiet)) {
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Test-Connection], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.TestConnectionCommand
WARNING: Errors found! Error Log: C:\restic\logs\20200216T2334197164.err.txt
Something went wrong. Sleeping for 15 min and then retrying...
I'm using the following config (it's for a repository on a rest-server
<https://github.com/restic/rest-server>):
# restic backup repository configuration
$Env:AWS_ACCESS_KEY_ID=''
$Env:AWS_SECRET_ACCESS_KEY=''
***@***.***/user'
$Env:RESTIC_PASSWORD='password'
I did see the comment in
https://github.com/kmwoley/restic-windows-backup/blob/master/backup.ps1#L216
and am guessing it's the string parsing that doesn't work properly.
Is this something you could fix easily or is it a more long-term issue? I
realize that a fix should preferrably be backend-agnostic, which isn't very
straight-forward.
For now I'll just hardcoded the proper hostname into that variable.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#9?email_source=notifications&email_token=ABOWG6H54EWTDFQIZ2S65FDRDHFI7A5CNFSM4KWHZGXKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IN4LCEA>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABOWG6BAUYIUBI4AX6RW7C3RDHFI7ANCNFSM4KWHZGXA>
.
|
I have the same error using an SFTP connection. |
As a quickfix:
|
I'll get a fix for this pretty shortly; the internet connectivity check didn't handle all repo types. It will in the next release. Thanks for letting me know! |
I've followed the installation instructions and am running stuff as an administrator, but noticed that the scheduled task didn't start properly. Turned out that it's due to this (the following is from a manual run in an administrator PS shell, to see the errors):
I'm using the following config (it's for a repository on a rest-server):
I did see the comment in https://github.com/kmwoley/restic-windows-backup/blob/master/backup.ps1#L216 and am guessing it's the string parsing that doesn't work properly.
Is this something you could fix easily or is it a more long-term issue? I realize that a fix should preferrably be backend-agnostic, which isn't very straight-forward.
For now I'll just hardcoded the proper hostname into that variable.
The text was updated successfully, but these errors were encountered: