8
n8n 中文网amn8n.com

自动 FTP 到 MinIO 备份

中级

这是一个File Management, Multimodal AI领域的自动化工作流,包含 8 个节点。主要使用 S3, Ftp, Set, ScheduleTrigger 等节点。 定时 FTP/SFTP 到 MinIO 备份,保留文件夹结构

前置要求
  • 无特殊前置要求,导入即可使用
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "R3ogyLIzRhuYmZQW",
  "meta": {
    "instanceId": "d62d7a3fb314923e2cdedec19423e9669591b9c9c87901bc9332b7c59c101257"
  },
  "name": "自动 FTP 到 MinIO 备份",
  "tags": [],
  "nodes": [
    {
      "id": "b8e287f9-e154-4bd3-b8bd-604295a18c38",
      "name": "便签32",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -960,
        -496
      ],
      "parameters": {
        "color": 5,
        "width": 272,
        "height": 256,
        "content": "## 配置此触发器"
      },
      "typeVersion": 1
    },
    {
      "id": "9c489554-f100-498b-8660-c13643972ee2",
      "name": "列出 FTP 文件夹内容",
      "type": "n8n-nodes-base.ftp",
      "position": [
        -640,
        -416
      ],
      "parameters": {
        "path": "/bitnami/wordpress/wp-content/uploads/2025/04",
        "protocol": "sftp",
        "operation": "list",
        "recursive": true
      },
      "credentials": {
        "sftp": {
          "id": "zoB9Ox6ewcWAPTby",
          "name": "SFTP account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "fcafdbd0-d5a7-47b4-900e-2aad25365ef7",
      "name": "下载内容",
      "type": "n8n-nodes-base.ftp",
      "position": [
        -192,
        -416
      ],
      "parameters": {
        "path": "={{ $('List FTP Folder contents').item.json.path }}",
        "protocol": "sftp"
      },
      "credentials": {
        "sftp": {
          "id": "zoB9Ox6ewcWAPTby",
          "name": "SFTP account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "8b4f3a56-3310-49f5-ae1c-a4e83c19d080",
      "name": "为 MinIO 创建路径",
      "type": "n8n-nodes-base.set",
      "position": [
        -416,
        -416
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "ddfd813d-d97d-42f6-ae21-8ff0e34ca8db",
              "name": "path",
              "type": "string",
              "value": "={{ $json.path.replace(/\\/[^\\/]+$/, '') }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "62fb915f-fc9c-4f38-85c9-42231e94cf4d",
      "name": "使用正确路径上传到 MinIO",
      "type": "n8n-nodes-base.s3",
      "position": [
        32,
        -416
      ],
      "parameters": {
        "fileName": "=",
        "operation": "upload",
        "bucketName": "myMinIObucket",
        "additionalFields": {
          "parentFolderKey": "=ftpFilesFolder{{ $('Create Path for MinIO').item.json.path }}"
        }
      },
      "credentials": {
        "s3": {
          "id": "p1G9A4UuSXaIH0xy",
          "name": "MinIO S3"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "023cd697-fc44-4cbe-a18f-5b50258deef6",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -32,
        -496
      ],
      "parameters": {
        "color": 5,
        "width": 272,
        "height": 256,
        "content": "## 创建并配置您的 MinIO 存储桶"
      },
      "typeVersion": 1
    },
    {
      "id": "71440038-a34a-42e2-8962-4eedfdcfc832",
      "name": "便签33",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -960,
        -816
      ],
      "parameters": {
        "width": 1200,
        "height": 304,
        "content": "## 带调度的自动化 FTP-SFTP 到 MinIO 对象备份"
      },
      "typeVersion": 1
    },
    {
      "id": "d7aaa29e-9996-4802-a3c9-0a267dbcef85",
      "name": "计划触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -864,
        -416
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 2
            }
          ]
        }
      },
      "typeVersion": 1.2
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "d462d16a-6269-42a3-8be7-849897e23756",
  "connections": {
    "Download content": {
      "main": [
        [
          {
            "node": "Upload on MinIO with correct Path",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "List FTP Folder contents",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Path for MinIO": {
      "main": [
        [
          {
            "node": "Download content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "List FTP Folder contents": {
      "main": [
        [
          {
            "node": "Create Path for MinIO",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

中级 - 文件管理, 多模态 AI

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
中级
节点数量8
分类2
节点类型5
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

作者
SIENNA

SIENNA

@sienna

French's leading data storage startup ! Offline Data Storage, Archival Storage, Cloud to Tape, Data Integrity assurance, multi-source backup, ... all automated with N8N ;)

外部链接
在 n8n.io 查看

分享此工作流