44 Commits

Author SHA1 Message Date
Kevin Woley
ce170f0685 bugfix: error checking was broken by release 1.7.1 (c8776b42c0) 2025-02-20 15:27:39 -08:00
Kevin Woley
eaf97cd2d7 add custom actions configuration to enable invoking scripts other commands on script start and end. Defined by $CustomAction* config variables. 2025-02-08 00:29:06 -08:00
Kevin Woley
ec212218c8 explicitly test the backup source media for VSS support instead of assuming it is or is not supported 2025-02-07 22:55:32 -08:00
Manuel Fombuena
19d8e65d92 fix some typos
Signed-off-by: Manuel Fombuena <fombuena@outlook.com>
2025-02-03 11:00:54 +00:00
Kevin Woley
d180f3f30c Metered connection check is now works for PowerShell 7, improved internet connection check logging 2025-02-01 22:48:06 -08:00
Kevin Woley
b642afa509 fix logic for checking metered network configuration settings 2025-01-27 15:28:23 -08:00
Kevin Woley
21e68f4b42 Merge branch 'release_1.7.1' into metered-check 2025-01-27 15:09:09 -08:00
Kevin Woley
c75bc74724 added more verose and explicit logging to the console via Write-Host 2025-01-27 11:14:41 -08:00
Kevin Woley
80fab4092c remove $Global: scoped variables in favor of $Script: scope, and explicitly scope each usage 2025-01-27 10:26:45 -08:00
Kevin Woley
c433c44b70 updated install script to use the global parameters, removed separate $SelfUpdateParameters 2025-01-27 10:15:13 -08:00
Kevin Woley
c8776b42c0 replaced "&" execution with Invoke-Expression, enabled refactoring to set $GlobalParameters in one place
Removed $ResticExe, $StateFile, and $LogPath from config.ps1
2025-01-26 12:53:12 -08:00
Kevin Woley
c930b9499e Merge branch 'main' into main 2025-01-26 00:00:29 -08:00
Kevin Woley
8a8165fe01 cast email addresses to their Mimekit types 2025-01-25 17:04:19 -08:00
Kevin Woley
4ee0eff191 rename email $PS* variable name settings to $Restic*, and warn if using deprecated email settings, 2025-01-24 23:34:43 -08:00
Kevin Woley
6e5bf4823b fix merged credential handling, handle back compat for existing secrets for SMTP port 2025-01-24 23:10:35 -08:00
innovara
c4a497e0d1 Replace deprecated Send-MailMessage with Send-MailKitMessage (#107)
The Send-MailMessage cmdlet is obsolete. It doesn't guarantee secure connections to SMTP servers.

Use Send-MailKitMessage module instead.

Signed-off-by: Manuel Fombuena <fombuena@outlook.com>
Co-authored-by: Kevin Woley <kmwoley@users.noreply.github.com>
2025-01-24 21:50:08 -08:00
Manuel Fombuena
09b9066049 Add feature to control backups on metered connections
restic-windows-backup runs backups irrespective of the host being on a metered connection or unrestricted. That can lead to situations in which the backup takes place when the user is on a metered connection and would rather not do it at that time, either because they would incur costs or use up their data allowance.

The default value of $BackupOnMeteredNetwork is set to $false following a conservative approach.

Closes https://github.com/kmwoley/restic-windows-backup/issues/82

Signed-off-by: Manuel Fombuena <fombuena@outlook.com>
2024-11-11 22:10:00 +00:00
Kevin Woley
efcdc9d291 clean up variable naming, style conventions for previous PR 2024-11-10 23:41:08 -08:00
SeeJayEmm
aad279210a Allow for unauthenticated SMTP. (#81)
* Allow for unauthenticated SMTP, fixes #66
2024-11-10 23:26:31 -08:00
Kevin Woley
5a660ea5d6 powershell 7.3+ fixes 2024-11-10 23:14:46 -08:00
Export33
6ec929a75c fix typ (#83)
Co-authored-by: Export <donotforgetme@web.de>
2024-11-10 15:13:29 -08:00
Joerg Reuter
0e8262ab05 Add optional configuration options for additional parameters to restic calls, $AdditionalParameters and $SelfUpdateParameters and make self update of restic binary configurable via $AllowResticSelfUpdate config option 2024-03-17 16:26:51 +01:00
Kevin Woley
be5e8ead2b Release 1.6 Merge (#73)
* $SnapshotDeepMaintenanceDays = $null disables deep data checks

* updated install binary links to v0.14

* add config point for additional backup parameters

* - backup and maintenance run independently
- fixed issues with several incorrect function return values

* check for new version of restic during maintenance

* removing duplicate excludes, resolves #60

* update restic .exe version
add self-update to the install script

* Release 1.6 Changelog updates
2023-01-14 22:44:11 -08:00
Kevin Woley
fac2462981 Add the ability to $IgnoreMissingBackupSources
- when $true, missing external drives or folders don't produce errors
- when $null or $false, missing drives and/or folders result in an error
- Default is set ot $false as not to silently fail backing up a source
2021-09-10 21:51:01 -07:00
Kevin Woley
d448db94c0 add support for external, removable drive backup
- select backup source by drive label, device name, or serial number
- fix forget policy to be safe for multiple drives (group by host,tags)
- tag each backup source with drive/source name
2021-09-08 16:35:59 -07:00
Kevin Woley
0919914dac internet connection test fix for PowerShell 7.1
resolves #37
2021-05-09 20:35:06 -07:00
Kevin Woley
ca90934e51 improve URL parsing, allow disabling of internet check
fixes #38
2021-05-09 20:19:29 -07:00
Kevin Woley
e5cc051edf remove uneeded -replace parameter 2021-05-07 20:06:55 -07:00
tree3887
817e67c354 Update backup.ps1 (#36)
Adds double quotes around each path and removes a trailing backslash from them as well. I have found through experimentation that restic does not like a backslash followed by a double quote. The backslash appears to be an escape character.
Surrounding the path with double quotes allows paths with spaces to be used.
2021-05-07 19:47:59 -07:00
Kevin Woley
01a38f893a add the ability to set a pruning policy
defaulted to --max-unused 1% in configuration.
2021-02-24 21:02:41 -08:00
Kevin Woley
387390759d removed snapshot code, added --use-fs-snapshot
Related changes -

removed folder enumeration and instead point to the root filesystem:
snapshot handling will be better now that changing folders won't group sets

default exlusion list updates:
C:\$Recycle.Bin
C:\$WINDOWS.~BT
C:\$WinREAgent
2021-02-24 19:47:35 -08:00
Kevin Woley
1eaef5f0c8 add error logging to sending emails
improve general error messaging
resolves #25
2021-02-22 20:34:53 -08:00
Kevin Woley
6bfba97a4c reverting the fix for URL parsing 2021-02-22 05:36:53 -08:00
Kevin Woley
ed92f4e213 Merge pull request #24 from Phlogi/patch-1
Fix URI parsing
2021-02-22 05:08:27 -08:00
Kevin Woley
6227786ae2 remove conflicting verbose/quiet
resolves #29
2021-02-22 05:02:05 -08:00
Phlogi
626ac2a0c5 Fix URI parsing
Tested only for sftp. Without the leading ..// the System.Uri will fail on the next line, as the string is empty.
2020-10-26 07:56:58 +01:00
Kevin Woley
229d21d753 add "generic" repo specific url internet tests 2020-06-08 08:39:07 -07:00
Kevin Woley
69e8a23b36 remove azure, gs, and b2 from connectivity check 2020-06-08 07:48:57 -07:00
Kevin Woley
63a8bb9218 retry error messaging improvements 2020-04-30 09:49:49 -07:00
Kevin Woley
7cff028471 send email on first success after a failure
(if SendEmailOnError is enabled)
2020-04-29 14:39:54 -07:00
Kevin Woley
b73008a5f1 internet connectivity check handles all repo types
Closes #10
2020-04-28 20:08:41 -07:00
Kevin Woley
0334de5546 bug fix: previous shadow copy could be backed up
If the previous run of the script were aborted, the shadow copy would be left aroudn and then backed up.
2020-02-13 23:04:46 -08:00
Kevin Woley
7f576135fc config points for disabling maintenance, email 2020-02-13 22:58:13 -08:00
Kevin Woley
073aa49f4f initial commit 2020-02-08 10:29:09 -08:00