🖧 How to specify your own SSH port when using rdiff-backup

Specify your own SSH port when using rdiff-backup.

rdiff-backup uses the standard SSH port when connecting to a remote host.

$ 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).

See the man page for how to specify additional connection parameters.

$ 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
--------------------------------------------------

As you can see, this is quite simple.

Sidebar