workflows.fit
Back to n8n workflows
n8n templateFreeBy Florent

Restore workflows and credentials from remote FTP backup storage

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 fro...

CommunicationHITLCore NodesData & StorageDevelopmentUtilitySticky NoteEmail Send
Loading interactive preview...

Template notes

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)