Back up a Linux server directory to Backblaze B2 with rclone
Quick overview This workflow uses SSH and rclone to back up a directory from a source server to a Backblaze B2 bucket on a schedule, optionally encrypting data with an rclone crypt remote, and supports either sync mirroring or versioned copy backups.
How it works Receives backup settings through an n8n Form trigger and stores the configuration in an n8n Data Table. Connects to the source server over SSH, installs rclone if it is missing, and creates an rclone Backblaze B2 remote (optionally adding an rclone crypt remote using the provided passphrase). Runs on a Schedule Trigger and loads the saved backup configuration from the n8n Data Table. Tests the rclone connection to Backblaze B2 (or to the encrypted crypt remote) over SSH and stops with an error if the credentials or bucket are invalid. If the selected mode is sync, mirrors the source directory to Backblaze B2 using rclone sync (using the crypt remote when encryption is enabled). If the selected mode is versioned, copies the source directory into a timestamped folder in Backblaze B2 using rclone copy (using the crypt remote when encryption is enabled).
Setup Ensure you have SSH access to the source server with an SSH key and passwordless sudo, since the workflow may install rclone via sudo. Create a Backblaze B2 bucket and generate a Key ID and Application Key with read/write access to that bucket. Open the Form trigger URL, submit the source directory, backup mode, bucket name, destination prefix, and B2 credentials, and optionally set an encryption passphrase if you enable encryption. Set the Schedule Trigger interval to your desired backup frequency and activate the workflow.
Requirements An SSH credential configured in n8n. A Linux server accessible over SSH. A Backblaze B2 account and bucket. A Backblaze B2 Key ID and Application Key.
Customization Changing the backup schedule. Switching between Sync and Versioned Backup. Modifying the destination path inside your bucket. Enabling or disabling encryption. Adding notifications (Slack, Email, Discord, Telegram, etc.) after successful or failed backups.
Additional info What is Backblaze B2?
Backblaze B2 is a reliable, affordable cloud object storage service that's fully compatible with rclone and trusted by developers, self-hosters, and businesses for backups and long-term storage. If you're new to Backblaze, it offers 10 GB of free storage, making it a great choice for testing this workflow or protecting smaller projects at no cost.
š Learn more: https://www.backblaze.com/cloud-storage
š„ Who is this for?
This template is perfect for system administrators, developers, home lab enthusiasts, and anyone looking for a simple, reliable, and automated way to back up a Linux server to cloud storage.
Related Templates
Transform Gmail Newsletters into Insightful LinkedIn Posts Using OpenAI
Who Is This For? This workflow is perfect for content creators, marketers, and business professionals who receive regu...
Compare Lists and Identify Common Items & Differences Using Custom Keys
This workflow compares two lists of objects (List A and List B) using a user-specified key (e.g. email, id, domain) and ...
AI Email Classifier & Auto-Delete for Gmail (SPAM/OFFER Cleaner)
This workflow is designed for freelancers, solopreneurs, and business owners who receive a high volume of irrelevant mes...
š Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments