This workflow corresponds to n8n.io template #9873 — we link there as the canonical source.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"id": "JxrInAO8OLCjxVC5",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Automated Rsync Backup with Password Auth & Alert System",
"tags": [],
"nodes": [
{
"id": "5c38117c-4f04-4033-a570-cc3d55e78f17",
"name": "Manual Trigger",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-2800,
224
],
"parameters": {},
"typeVersion": 1
},
{
"id": "f4d96789-441a-4152-b4d8-6922581dfe5b",
"name": "Server Parameters",
"type": "n8n-nodes-base.set",
"position": [
-2576,
224
],
"parameters": {
"values": {
"string": [
{
"name": "source_host",
"value": "source_host_ip"
},
{
"name": "source_port",
"value": "source_host_ssh_port"
},
{
"name": "source_user",
"value": "source_user_username"
},
{
"name": "source_password",
"value": "=source_user_password"
},
{
"name": "source_folder",
"value": "source_path_on_the_source_host"
},
{
"name": "target_host",
"value": "target_host_ip"
},
{
"name": "target_port",
"value": "target_host_ssh_port"
},
{
"name": "target_user",
"value": "target_user_username"
},
{
"name": "target_password",
"value": "=target_user_password"
},
{
"name": "target_folder",
"value": "target_path_on_the_target_host"
},
{
"name": "rsync_options",
"value": "-avz --delete"
}
]
},
"options": {}
},
"typeVersion": 1
},
{
"id": "2856d809-25ad-46ba-8056-84e78c7fd66c",
"name": "Check Sshpass Local",
"type": "n8n-nodes-base.executeCommand",
"position": [
-2352,
224
],
"parameters": {
"command": "which sshpass"
},
"typeVersion": 1,
"continueOnFail": true
},
{
"id": "98869a56-7d59-4055-bbf8-d437f6d7ca12",
"name": "Is Installed Local?",
"type": "n8n-nodes-base.if",
"position": [
-2128,
224
],
"parameters": {
"conditions": {
"number": [
{
"value1": "={{ $json.exitCode }}"
}
]
}
},
"typeVersion": 1
},
{
"id": "5fdd117b-5e40-4f21-987c-7ca7fb5b2c8b",
"name": "Install Sshpass Local",
"type": "n8n-nodes-base.executeCommand",
"position": [
-1920,
320
],
"parameters": {
"command": "=if command -v apt-get &> /dev/null; then\n apt-get update && apt-get install -y sshpass rsync\nelif command -v yum &> /dev/null; then\n yum install -y epel-release && yum install -y sshpass rsync\nelif command -v dnf &> /dev/null; then\n dnf install -y sshpass rsync\nelif command -v apk &> /dev/null; then\n apk add sshpass rsync\nelse\n echo \"Unsupported package manager\"\n exit 1\nfi"
},
"typeVersion": 1
},
{
"id": "2e5c2163-e384-4488-9fb6-68d74ce3e932",
"name": "Check Sshpass on Source",
"type": "n8n-nodes-base.executeCommand",
"position": [
-1696,
224
],
"parameters": {
"command": "=sshpass -p '{{ $('Server Parameters').item.json.source_password }}' ssh -o StrictHostKeyChecking=no -p {{ $('Server Parameters').item.json.source_port }} {{ $('Server Parameters').item.json.source_user }}@{{ $('Server Parameters').item.json.source_host }} \"which sshpass\""
},
"typeVersion": 1,
"continueOnFail": true
},
{
"id": "5916c184-5925-4fb4-8c8e-accc74e4df29",
"name": "Is Installed on Source?",
"type": "n8n-nodes-base.if",
"position": [
-1472,
224
],
"parameters": {
"conditions": {
"number": [
{
"value1": "={{ $json.exitCode }}"
}
]
}
},
"typeVersion": 1
},
{
"id": "b302372f-007c-4afa-89e1-a453e03064c8",
"name": "Install Sshpass on Source",
"type": "n8n-nodes-base.executeCommand",
"position": [
-1248,
320
],
"parameters": {
"command": "=sshpass -p '{{ $('Server Parameters').item.json.source_password }}' ssh -o StrictHostKeyChecking=no -p {{ $('Server Parameters').item.json.source_port }} {{ $('Server Parameters').item.json.source_user }}@{{ $('Server Parameters').item.json.source_host }} \"if command -v apt-get &> /dev/null; then echo '{{ $('Server Parameters').item.json.source_password }}' | sudo -S apt-get update && echo '{{ $('Server Parameters').item.json.source_password }}' | sudo -S apt-get install -y sshpass rsync; elif command -v yum &> /dev/null; then echo '{{ $('Server Parameters').item.json.source_password }}' | sudo -S yum install -y epel-release && echo '{{ $('Server Parameters').item.json.source_password }}' | sudo -S yum install -y sshpass rsync; elif command -v dnf &> /dev/null; then echo '{{ $('Server Parameters').item.json.source_password }}' | sudo -S dnf install -y sshpass rsync; else echo 'Unsupported package manager'; exit 1; fi\""
},
"typeVersion": 1
},
{
"id": "93e5b9e9-5a31-404f-932c-ba050d10e5d5",
"name": "Execute Rsync Backup",
"type": "n8n-nodes-base.executeCommand",
"position": [
-1040,
224
],
"parameters": {
"command": "=sshpass -p '{{ $('Server Parameters').item.json.source_password }}' ssh -o StrictHostKeyChecking=no -p {{ $('Server Parameters').item.json.source_port }} {{ $('Server Parameters').item.json.source_user }}@{{ $('Server Parameters').item.json.source_host }} \"sshpass -p '{{ $('Server Parameters').item.json.target_password }}' rsync {{ $('Server Parameters').item.json.rsync_options }} -e 'ssh -o StrictHostKeyChecking=no -p {{ $('Server Parameters').item.json.target_port }}' {{ $('Server Parameters').item.json.source_folder }}/ {{ $('Server Parameters').item.json.target_user }}@{{ $('Server Parameters').item.json.target_host }}:{{ $('Server Parameters').item.json.target_folder }}/\""
},
"typeVersion": 1
},
{
"id": "e2b2ff1a-0d35-42ba-875d-8bb0e78dae8a",
"name": "Success?",
"type": "n8n-nodes-base.if",
"position": [
-816,
224
],
"parameters": {
"conditions": {
"number": [
{
"value1": "={{ $json.exitCode }}",
"operation": "equal"
}
]
}
},
"typeVersion": 1
},
{
"id": "ae9e2524-1b95-4473-8679-1b42809583cd",
"name": "Backup Successful",
"type": "n8n-nodes-base.set",
"position": [
-592,
128
],
"parameters": {
"values": {
"string": [
{
"name": "status",
"value": "SUCCESS"
},
{
"name": "timestamp",
"value": "={{ $now.format('YYYY-MM-DD HH:mm:ss') }}"
},
{
"name": "source",
"value": "={{ $('Server Parameters').item.json.source_host }}:{{ $('Server Parameters').item.json.source_folder }}"
},
{
"name": "target",
"value": "={{ $('Server Parameters').item.json.target_host }}:{{ $('Server Parameters').item.json.target_folder }}"
},
{
"name": "output",
"value": "={{ $('Execute Rsync Backup').item.json.stdout }}"
}
]
},
"options": {}
},
"typeVersion": 1
},
{
"id": "3d4ee816-96aa-4ac3-ab96-54f8ab220807",
"name": "Backup Failed",
"type": "n8n-nodes-base.set",
"position": [
-592,
320
],
"parameters": {
"values": {
"string": [
{
"name": "status",
"value": "ERROR"
},
{
"name": "timestamp",
"value": "={{ $now.format('YYYY-MM-DD HH:mm:ss') }}"
},
{
"name": "source",
"value": "={{ $('Server Parameters').item.json.source_host }}"
},
{
"name": "target",
"value": "={{ $('Server Parameters').item.json.target_host }}"
},
{
"name": "output",
"value": "={{ $('Execute Rsync Backup').item.json.exitCode }} -- {{ $('Execute Rsync Backup').item.json.stderr }}"
}
]
},
"options": {}
},
"typeVersion": 1
},
{
"id": "f7d833ae-0003-48f8-8d13-4f22cb70f52f",
"name": "Process Finish Report --- Telegam & SMS",
"type": "n8n-nodes-base.executeCommand",
"onError": "continueRegularOutput",
"position": [
-272,
224
],
"parameters": {
"command": "=apk add curl\n\nexport TOKEN=\"YOUR-TELEGRAM-BOT-TOKEN\"\nexport CHAT_ID=\"YOUR-TELEGRAM-CHANNEL-ID\"\nexport MESSAGE=\"{{ $json.timestamp }} -- {{ $json.status }} :: {{ $json.source }} -> {{ $json.target }} :: {{ $json.output }}\"\n\ncurl -s -X POST \"https://api.telegram.org/bot$TOKEN/sendMessage\" -d chat_id=\"$CHAT_ID\" -d text=\"$MESSAGE\"\n\nNUMBERS=\"+36301234567\"\n\nfor PHONE in $NUMBERS; do\n curl -X POST https://textbelt.com/text --data-urlencode phone=\"$PHONE\" --data-urlencode message=\"$MESSAGE\" -d key=YOUR-TEXTBELT-API-KEY\ndone"
},
"typeVersion": 1
},
{
"id": "4f541742-fac7-4d71-b236-c4bc65856f4a",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-3088,
-240
],
"parameters": {
"width": 380,
"height": 232,
"content": "## Automated Rsync Backup\n\nPassword-based SSH backup between servers using rsync.\n\nAutomatically installs dependencies, performs backup from source to target server, and sends status notifications via Telegram and SMS.\n\nSupports Ubuntu, Debian, RHEL, CentOS, and Alpine."
},
"typeVersion": 1
},
{
"id": "b74c3604-78af-4a0c-a7df-b4bd0c1ecd71",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2576,
384
],
"parameters": {
"width": 340,
"height": 348,
"content": "## SERVER CONFIGURATION REQUIRED\n\nSource Server:\n- source_host, source_port, source_user\n- source_password, source_folder\n\nTarget Server:\n- target_host, target_port, target_user\n- target_password, target_folder\n\nRsync Options:\n- Default: -avz --delete\n- Archive, verbose, compress, mirror"
},
"typeVersion": 1
},
{
"id": "b6910e2a-f654-4918-a3e1-51bddbe9bb51",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2352,
-64
],
"parameters": {
"width": 340,
"height": 248,
"content": "## Dependency Management\n\nAutomatically checks and installs sshpass and rsync:\n1. Check if sshpass installed locally\n2. Install if missing (apt/yum/dnf/apk)\n3. Check sshpass on source server\n4. Install on source if needed (with sudo)\n\nNo manual installation required."
},
"typeVersion": 1
},
{
"id": "720d40a5-6799-4d92-8b2d-1b4e27e7408c",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1040,
-64
],
"parameters": {
"width": 320,
"height": 256,
"content": "## Backup Execution\n\nConnects to source server via SSH and executes rsync command.\n\nData transfers directly between source and target servers, not through n8n.\n\nUses password authentication for both connections with StrictHostKeyChecking disabled."
},
"typeVersion": 1
},
{
"id": "55adad40-e782-4687-bd28-d99414754a2e",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-592,
464
],
"parameters": {
"width": 300,
"height": 224,
"content": "## Status Handling\n\nChecks rsync exit code:\n- Exit 0: Success - captures stdout\n- Non-zero: Failure - captures exit code and stderr\n\nBoth paths generate detailed status report with timestamp and server info."
},
"typeVersion": 1
},
{
"id": "db8dbab3-3671-424e-b690-d82c56bed6c5",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-272,
-96
],
"parameters": {
"width": 340,
"height": 296,
"content": "## NOTIFICATION CONFIGURATION\n\nReplace placeholders:\n- YOUR-TELEGRAM-BOT-TOKEN\n- YOUR-TELEGRAM-CHANNEL-ID\n- +36301234567 (phone numbers)\n- YOUR-TEXTBELT-API-KEY\n\nSends success or failure report with timestamp, source, target, and output details."
},
"typeVersion": 1
},
{
"id": "0c19273d-a6a3-43c9-9f4a-a43f8a1029b1",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-3248,
128
],
"parameters": {
"width": 388,
"height": 112,
"content": "## Scheduling\n\nCurrently manual trigger and Schedule Trigger."
},
"typeVersion": 1
},
{
"id": "f5f0cb34-f5a9-4ad9-a2ee-54852328bc54",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-2800,
32
],
"parameters": {
"rule": {
"interval": [
{}
]
}
},
"typeVersion": 1.2
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "44bd3bc1-2f84-4948-b794-6a8b23b50258",
"connections": {
"Success?": {
"main": [
[
{
"node": "Backup Successful",
"type": "main",
"index": 0
}
],
[
{
"node": "Backup Failed",
"type": "main",
"index": 0
}
]
]
},
"Backup Failed": {
"main": [
[
{
"node": "Process Finish Report --- Telegam & SMS",
"type": "main",
"index": 0
}
]
]
},
"Manual Trigger": {
"main": [
[
{
"node": "Server Parameters",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger": {
"main": [
[
{
"node": "Server Parameters",
"type": "main",
"index": 0
}
]
]
},
"Backup Successful": {
"main": [
[
{
"node": "Process Finish Report --- Telegam & SMS",
"type": "main",
"index": 0
}
]
]
},
"Server Parameters": {
"main": [
[
{
"node": "Check Sshpass Local",
"type": "main",
"index": 0
}
]
]
},
"Check Sshpass Local": {
"main": [
[
{
"node": "Is Installed Local?",
"type": "main",
"index": 0
}
]
]
},
"Is Installed Local?": {
"main": [
[
{
"node": "Check Sshpass on Source",
"type": "main",
"index": 0
}
],
[
{
"node": "Install Sshpass Local",
"type": "main",
"index": 0
}
]
]
},
"Execute Rsync Backup": {
"main": [
[
{
"node": "Success?",
"type": "main",
"index": 0
}
]
]
},
"Install Sshpass Local": {
"main": [
[
{
"node": "Check Sshpass on Source",
"type": "main",
"index": 0
}
]
]
},
"Check Sshpass on Source": {
"main": [
[
{
"node": "Is Installed on Source?",
"type": "main",
"index": 0
}
]
]
},
"Is Installed on Source?": {
"main": [
[
{
"node": "Execute Rsync Backup",
"type": "main",
"index": 0
}
],
[
{
"node": "Install Sshpass on Source",
"type": "main",
"index": 0
}
]
]
},
"Install Sshpass on Source": {
"main": [
[
{
"node": "Execute Rsync Backup",
"type": "main",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This n8n workflow provides automated rsync backup capabilities between servers using password authentication. It automatically installs required dependencies, performs the backup operation from a source server to a target server, and sends status notifications via Telegram and…
Source: https://n8n.io/workflows/9873/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Batch-convert CAD/BIM files to analysis-ready XLSX and optional DAE with automatic verification and a clean HTML report. Runs locally via and PowerShell on Windows.
This n8n workflow template uses community nodes and is only compatible with the self-hosted version of n8n.
Community Node Disclaimer: This workflow uses KlickTipp community nodes.
Sync your Linear issues to Todoist automatically with this n8n workflow. When an issue is created, updated, or completed in Linear, a corresponding task is created, updated, or closed in Todoist. Trig
Back up n8n workflows to Google Drive automatically This workflow provides a robust solution for backing up your n8n workflows to Google Drive. It is designed to handle backups for multiple n8n instan