Skip to content

Rsync ​

Store backups on a remote server via rsync over SSH. Ideal for efficient incremental transfers and Unix/Linux servers.

Prerequisites ​

  • rsync must be installed on both the DBackup server and the remote target
  • SSH access to the remote server

Docker Users

The default DBackup Docker image includes rsync. If you're running DBackup outside Docker, ensure rsync is installed: which rsync

Configuration ​

Credential Profile required

Rsync requires a Credential Profile of type SSH_KEY. Create one in Vault → Credentials before saving the destination.

FieldDescriptionDefaultRequired
NameFriendly name for this destination-✅
HostHostname or IP of the remote server-✅
PortSSH port22❌
LoginSSH_KEY credential profile (username + key or password)-✅
FolderRemote directory for backups. The folder button beside it browses the server from its top once the connection and its login are filled in-✅
OptionsAdditional rsync flags (e.g. --bwlimit=1000)-❌

Authentication Methods (via SSH_KEY profile) ​

Auth TypeDescription
passwordUsername + password via sshpass
privateKeySSH private key (PEM format)
agentUse the host's SSH agent (keys loaded via ssh-add)

Setup Guide ​

  1. Create an SSH_KEY credential profile in Vault → Credentials (guide)
  2. Ensure the target server has rsync and SSH installed
  3. Create a dedicated user with write access to the backup directory:
    bash
    sudo useradd -m dbackup
    sudo mkdir -p /backups/dbackup
    sudo chown dbackup: /backups/dbackup
  4. Go to Connections → Destinations → New destination → Rsync
  5. Enter Host and pick the credential profile under Login
  6. Set the Folder in the Location part to the remote directory (e.g. /backups/dbackup), or pick it with the folder button (📂)
  7. (Optional) Add custom Options for bandwidth limiting or other flags
  8. Click Test connection to verify the connection

How It Works ​

  • DBackup invokes rsync -az over SSH to transfer backup files
  • All transfers are encrypted in transit via SSH
  • Custom options are appended to the rsync command
  • All credentials (passwords, private keys) are stored AES-256-GCM encrypted in the database

Troubleshooting ​

rsync: command not found ​

rsync: command not found

Solution: Install rsync on both servers. On Debian/Ubuntu: apt install rsync. On the remote server, rsync must be in the default PATH.

Connection Refused ​

ssh: connect to host ... port 22: Connection refused

Solution: Verify the host and port. Ensure SSH is running and the firewall allows the connection.

Permission Denied ​

rsync: mkstemp failed: Permission denied (13)

Solution: Ensure the SSH user has write access to the folder on the remote server.

Listing a Very Large Folder ​

The server answered with more than 256 MB. Back up its subfolders as separate sources.

DBackup lists a folder with one find over SSH before it copies it, and that list may run for 10 minutes and hold up to 256 MB, enough for millions of files.

Solution: Split the folder into several directory sources, one per subfolder. A message that the server did not finish within 600 seconds means the same, often on a server whose find lacks -printf, like macOS, where each file costs a stat of its own.

Bandwidth Limiting ​

To limit transfer speed, add --bwlimit=1000 (KB/s) in the Options field. Useful for avoiding bandwidth saturation on shared connections.

Next Steps ​

Released under the GNU General Public License. | Privacy · Legal Notice