Templates / Restore workflows and credentials from remote FTP backup storage

Restore workflows and credentials from remote FTP backup storage

Ready for 3.0

by Florent ✓ · 349 views · created 2025-10-01 · DevOps

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

Nodes used (9)

What it does

Restore workflows & credentials from FTP - Remote Backup Solution This n8n template provides a safe and intelligent restore solution for self-hosted n8n instances, allowing you to restore workflows and credentials from FTP remote backups. Perfect for disaster recovery or migrating between environments, this workflow automatically identifies your most recent FTP backup and provides a manual restore capability that intelligently excludes the current workflow to prevent conflicts. Works seamlessly with date-organized backup folders stored on any FTP/SFTP server. Good to know - This workflow uses n8n's native import commands (n8n import:workflow and n8n import:credentials) - Works with date-formatted backup folders (YYYY-MM-DD) stored on FTP servers - The restore process intelligently excludes the current workflow to prevent overwriting itself - Requires FTP/SFTP server access and proper Docker volume configuration - All downloaded files are temporarily stored server-side before import - Compatible with backups created by n8n's export commands and uploaded to FTP - Supports selective restoration: restore only credentials, only workflows, or both How it works Restore Process (Manual) 1. Manual trigger with configurable pinned data options (credentials: true/false, worflows: true/false) 2. The Init node sets up all necessary paths, timestamps, and configuration variables using your environment settings 3. The workflow connects to your FTP server and scans for available backup dates 4. Automatically identifies the most recent backup folder (latest YYYY-MM-DD date) 5. Creates temporary restore folders on your local server for downloaded files 6. If restoring credentials: - Lists all credential files from FTP backup folder - Downloads credential files to temporary local folder - Writes files to disk using "Read/Write Files from Disk" node - Direct import using n8n's import command - Credentials are imported with their encrypted format intact 7. If restoring workflows: - Lists all workflow JSON files from FTP backup folder - Downloads workflow files to temporary local folder - Filters out the credentials subfolder to prevent importing it as a workflow - Writes workflow files to disk - Intelligently excludes the current restore workflow to prevent conflicts - Imports all other workflows using n8n's import command 8. Optional email notifications provide detailed restore summaries with command outputs 9. Temporary files remain on server for verification (manual cleanup recommended) How to use Prerequisites - Existing n8n backups on FTP server in date-organized folder structure (format: /ftp-backup-folder/YYYY-MM-DD/) - Workflow backups as JSON files in the date folder - Credentials backups in subfolder: /ftp-backup-folder/YYYY-MM-DD/n8n-credentials/ - FTP/SFTP access credentials configured in n8n - For new environments: N8NENCRYPTIONKEY from source environment (see dedicated section below) Initial Setup 1. Configure your environment variables: - N8NADMINEMAIL: Your email for notifications (optional) - FTPBACKUPFOLDER: FTP path where backups are stored (e.g., /n8n-backups) - N8NPROJECTSDIR: Projects root directory (e.g., /files/n8n-projects-data) - GENERICTIMEZONE: Your local timezone (e.g., Europe/Paris) - N8NENCRYPTIONKEY: Required if restoring credentials to a new environment (see dedicated section below) 2. Create your FTP credential in n8n: - Add a new FTP/SFTP credential - Configure host, port, username, and password/key - Test the connection 3. Update the Init node: - (Optional) Configure your email here: const N8NADMINEMAIL = $env.N8NADMINEMAIL || '[email protected]'; - Set PROJECTFOLDERNAME to "Workflow-backups" (or your preferred name) - Set FTPBACKUPFOLDER to match your FTP backup path (default: /n8n-backups) - Set credentials to "n8n-credentials" (or your backup credentials folder name) - Set FTPName to a descriptive name for your FTP server (used in notifications) 4. Configure FTP credentials in nodes: - Update the FTP creden

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.