Differences
This shows you the differences between the selected revisions of the page.
| script_local_move_after_successful_upload 2017-10-04 | script_local_move_after_successful_upload 2023-06-05 (current) | ||
| Line 22: | Line 22: | ||
| UserName = "user" | UserName = "user" | ||
| Password = "mypassword" | Password = "mypassword" | ||
| - | SshHostKeyFingerprint = "ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx" | + | SshHostKeyFingerprint = "ssh-rsa 2048 xxxxxxxxxxx..." |
| } | } | ||
| Line 59: | Line 59: | ||
| exit 0 | exit 0 | ||
| } | } | ||
| - | catch [Exception] | + | catch |
| { | { | ||
| Write-Host "Error: $($_.Exception.Message)" | Write-Host "Error: $($_.Exception.Message)" | ||
| Line 94: | Line 94: | ||
| Contrary to the PowerShell script above, this solution is not transactionally safe. If new files appear in the local folder between times the upload starts and the archiving/moving starts, the new files will not get uploaded. For this reason, prefer using the PowerShell script. | Contrary to the PowerShell script above, this solution is not transactionally safe. If new files appear in the local folder between times the upload starts and the archiving/moving starts, the new files will not get uploaded. For this reason, prefer using the PowerShell script. | ||
| + | |||
| + | Another option is to move the files to an intermediate/temporary folder first, upload from there, and then move them to the backup location. | ||
| ===== Further Reading ===== | ===== Further Reading ===== | ||