我编写了一个 PS1 脚本,该脚本对文件进行 7-zip 压缩,并使用 PuTTY 的 SCP 将其存储在我的备份服务器上。我已经测试过它并且工作完美。
然后,我登录到 SQL Server 代理,并向备份作业添加一个额外的步骤,以便在备份作业完成后立即执行该脚本。它被正确调用,创建 .7z 文件,并调用 pscp.exe...并停止。我转到 SQL Server 代理的作业活动监视器并找到以下内容:
Message
The server's host key is not cached in the registry. You
have no guarantee that the server is the computer you
think it is.
The server's rsa2 key fingerprint is:
ssh-rsa 2048 b5:f8:d2:5f:be:90:b6:be:15:d3:26:d5:c6:42:59:05
If you trust this host, enter "y" to add the key to
PuTTY's cache and carry on connecting.
If you want to carry on connecting just once, …Run Code Online (Sandbox Code Playgroud) 如何在 Bash 脚本中获取当前 Debian 或 Ubuntu 版本的简单小写名称,例如stretch、jessie、xenial、artful?