HostnExtraHostnExtra Docs

Sync Targets

Configure local and remote synchronization targets.

Sync Targets

HostnExtra Sync supports local-to-remote and remote-to-local synchronization using SSH targets.

A remote target uses the following format:

HOST:/REMOTE/PATH

Local to Remote

Push a local directory to a remote server:

hostnextra sync push ./build --to web-prod-01:/var/www

The local directory is:

./build

The remote destination is:

web-prod-01:/var/www

Remote to Local

Pull a remote directory to the local machine:

hostnextra sync pull web-prod-01:/var/www/build --to ./backup

Direct SSH Targets

You can specify the SSH user and hostname directly:

hostnextra sync push ./build \
    --to [email protected]:/var/www

This does not require the HostnExtra SSH Config plugin.

HostnExtra SSH Config

HostnExtra Sync can use server definitions from the HostnExtra SSH Config plugin.

For example:

hostnextra sync push ./build \
    --to web-prod-01:/var/www

When the SSH Config plugin is available, HostnExtra Sync can use configured SSH connection information such as:

  • Host
  • User
  • Port
  • Identity file
  • ProxyJump

The SSH Config plugin is optional.

Direct SSH targets work independently.

Remote rsync

The remote server must have rsync installed.

HostnExtra Sync checks remote rsync availability before starting synchronization.

If rsync is unavailable, install it on the remote server using the appropriate package manager.

Ubuntu / Debian

sudo apt install rsync

RHEL / Rocky / AlmaLinux / Fedora

sudo dnf install rsync

Arch Linux

sudo pacman -S rsync

On this page