kmwoley / restic-windows-backup

Powershell scripts to run Restic backups on Windows
MIT License
330 stars 68 forks source link

Issue with Repository String #91

Open killmasta93 opened 1 year ago

killmasta93 commented 1 year ago

HI @kmwoley Currently trying to backup to another smb server, and were getting two issues

1) the issue to copy though smb

[[Internet]] Repository string could not be parsed.
[[Backup]] Failed - cannot access repository.

in my secrets i have this


# restic backup repository configuration
#$Env:AWS_ACCESS_KEY_ID='<KEY>'
#$Env:AWS_SECRET_ACCESS_KEY='<KEY>'
$Env:RESTIC_REPOSITORY='\\192.168.21.27\N'
$Env:RESTIC_PASSWORD='test'

i did the following on locally and it works fine

2) issue with the sending email alert


# email configuration
$PSEmailServer='mail.domain.com'
$ResticEmailConfig=@{UseSsl=$false;}
$ResticEmailTo='alerts@domain.com'
$ResticEmailFrom='alerts@domain.com'
$ResticEmailUsername='alerts@domain.com'
$ResticEmailPassword='thepass'

i keep getting


Send-MailMessage : The operation has timed out.
At C:\restic\backup.ps1:337 char:9
+         Send-MailMessage @ResticEmailConfig -From $ResticEmailFrom -T ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.Mail.SmtpClient:SmtpClient) [Send-MailMessage], SmtpExcept 
   ion
    + FullyQualifiedErrorId : SmtpException,Microsoft.PowerShell.Commands.SendMailMessage

[[Email]] Sending email completed with errors

but on the server i can access fine the email server

Thank you

JBlond commented 9 months ago

it works if you set $repository_host = $env:RESTIC_REPOSITORY