{"product_id":"back-up-linux-servers-with-borg-over-ssh-n8n-workflow","title":"Back up Linux Servers with Borg over SSH | n8n Workflow","description":"\u003ch3\u003eBack up your Linux servers automatically with Borg over SSH—configured via an n8n form\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow collects Borg Backup settings from an n8n Form, stores them in an n8n Data Table, and then runs scheduled SSH tasks to install Borg, set up restricted SSH access, and create\/prune backups from a chosen source directory to a remote destination repository.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCaptures backup configuration:\u003c\/strong\u003e Receives source path, destination repository path, an encryption choice, and remote SSH details from an n8n Form trigger.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eNormalizes and saves settings:\u003c\/strong\u003e Normalizes parameters (including mode, port, and whether encryption is enabled) and writes the configuration to an \u003cstrong\u003en8n Data Table\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003ePrepares encryption (if enabled):\u003c\/strong\u003e Saves or removes the \u003cstrong\u003eBorg passphrase file\u003c\/strong\u003e on the source server over SSH depending on your encryption setting.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eRuns on schedule:\u003c\/strong\u003e Loads the saved configuration, then connects to both the \u003cstrong\u003esource\u003c\/strong\u003e and \u003cstrong\u003edestination\u003c\/strong\u003e servers over SSH.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eBootstraps Borg securely:\u003c\/strong\u003e Ensures Borg is installed, generates a dedicated SSH key on the source, and creates a restricted \u003cstrong\u003eborg_backup\u003c\/strong\u003e user on the destination with a forced \u003ccode\u003eborg serve\u003c\/code\u003e command.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eInitializes and performs backups:\u003c\/strong\u003e Initializes the remote repository if needed, then creates backups as versioned archives or as a single “latest” archive—followed by pruning of older archives when applicable.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eTransfers backups via SSH:\u003c\/strong\u003e Writes the backup to the destination server over SSH.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eSmall teams running server backups without building a custom orchestration system.\u003c\/li\u003e\n  \u003cli\u003eSaaS operators needing repeatable, form-driven Borg Backup deployments across environments.\u003c\/li\u003e\n  \u003cli\u003eAutomation engineers standardizing SSH-restricted backup access for safer repository writes.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eForm + Data Table:\u003c\/strong\u003e Form Trigger to capture settings; Data Table to persist configuration.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSSH automation:\u003c\/strong\u003e Uses SSH connections to install Borg, manage keys, and run backup\/initialization commands.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eNodes in workflow:\u003c\/strong\u003e \u003ccode\u003eif\u003c\/code\u003e, \u003ccode\u003essh\u003c\/code\u003e, \u003ccode\u003ecode\u003c\/code\u003e, \u003ccode\u003edata table\u003c\/code\u003e, plus support nodes like \u003ccode\u003esticky note\u003c\/code\u003e for clarity.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSetup requirement:\u003c\/strong\u003e Create n8n SSH credentials for both hosts (private key auth) with users that have passwordless sudo on each machine.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45916245852339,"sku":"N8N-18799","price":28.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/PBezVkVT-FWc6l-BBkCNL_ech6Gpe3.png?v=1788013491","url":"https:\/\/buyflowscripts.com\/products\/back-up-linux-servers-with-borg-over-ssh-n8n-workflow","provider":"N8N Commerce","version":"1.0","type":"link"}