using使用rdiff-backup时如何指定自己的SSH端口

使用rdiff-backup时,请指定您自己的SSH端口。

连接到远程主机时,rdiff-backup使用标准的SSH端口。

$ rdiff-backup --print-statistics ~/Projects/personal/ [email protected]::/rdiff-backup/repositories/personal
ssh: connect to host backup.example.org port 22: Connection refused
Fatal Error: Truncated header string (problem probably originated remotely)

Couldn't start up the remote connection by executing

    ssh -C [email protected] rdiff-backup --server

Remember that, under the default settings, rdiff-backup must be
installed in the PATH on the remote system.  See the man page for more
information on this.  This message may also be displayed if the remote
version of rdiff-backup is quite different from the local version (2.0.0).

有关如何指定其他连接参数的信息,请参见手册页。

$ rdiff-backup --print-statistics --remote-schema "ssh -C -p 2222 %s rdiff-backup --server" ~/Projects/personal/ [email protected]::/rdiff-backup/repositories/personal
--------------[ Session statistics ]--------------
StartTime 1599393121.00 (Sun Sep  6 11:52:01 2020)
EndTime 1599393121.48 (Sun Sep  6 11:52:01 2020)
ElapsedTime 0.48 (0.48 seconds)
SourceFiles 11
SourceFileSize 10543 (10.3 KB)
MirrorFiles 1
MirrorFileSize 0 (0 bytes)
NewFiles 10
NewFileSize 10543 (10.3 KB)
DeletedFiles 0
DeletedFileSize 0 (0 bytes)
ChangedFiles 1
ChangedSourceSize 0 (0 bytes)
ChangedMirrorSize 0 (0 bytes)
IncrementFiles 0
IncrementFileSize 0 (0 bytes)
TotalDestinationSizeChange 10543 (10.3 KB)
Errors 0
--------------------------------------------------

如您所见,这非常简单。

Sidebar