{
  "id": "R3ogyLIzRhuYmZQW",
  "name": "Automatic FTP to MinIO Backup",
  "tags": [],
  "nodes": [
    {
      "id": "b8e287f9-e154-4bd3-b8bd-604295a18c38",
      "name": "Sticky Note32",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -960,
        -496
      ],
      "parameters": {
        "color": 5,
        "width": 272,
        "height": 256,
        "content": "## Configure this trigger"
      },
      "typeVersion": 1
    },
    {
      "id": "9c489554-f100-498b-8660-c13643972ee2",
      "name": "List FTP Folder contents",
      "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": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "fcafdbd0-d5a7-47b4-900e-2aad25365ef7",
      "name": "Download content",
      "type": "n8n-nodes-base.ftp",
      "position": [
        -192,
        -416
      ],
      "parameters": {
        "path": "={{ $('List FTP Folder contents').item.json.path }}",
        "protocol": "sftp"
      },
      "credentials": {
        "sftp": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "8b4f3a56-3310-49f5-ae1c-a4e83c19d080",
      "name": "Create Path for 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": "Upload on MinIO with correct Path",
      "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": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "023cd697-fc44-4cbe-a18f-5b50258deef6",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -32,
        -496
      ],
      "parameters": {
        "color": 5,
        "width": 272,
        "height": 256,
        "content": "## Create and configure your MinIO Bucket"
      },
      "typeVersion": 1
    },
    {
      "id": "71440038-a34a-42e2-8962-4eedfdcfc832",
      "name": "Sticky Note33",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -960,
        -816
      ],
      "parameters": {
        "width": 1200,
        "height": 304,
        "content": "## Automated FTP-SFTP to MinIO Object Backup with Scheduling \n\nWant to automatically backup Files & Folder from any FTP-SFTP Server (Like your Wordpress Website !) ? You're at the right place \n\nConfigure the Schedule Trigger to best suit your needs, create a SFTP account on N8N and write the path to the files you want to backup (could be a simple folder or an entire server) and don't forget to check the Recursive Option (to get all files !)\n\nThen, simply deploy a MinIO service on your network (Using Proxmox VE ? create a LXC using https://community-scripts.github.io/ProxmoxVE/scripts?id=minio) and configure the path to the bucket where your FTP Files will be (like 192.168.1.123:9000 and your bucket)\n\n## -> Pro Tip, you can change the MinIO Node for an AWS S3, Azure Blob, GCP or any S3 Compatible Storage that you want !"
      },
      "typeVersion": 1
    },
    {
      "id": "d7aaa29e-9996-4802-a3c9-0a267dbcef85",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -864,
        -416
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 2
            }
          ]
        }
      },
      "typeVersion": 1.2
    }
  ],
  "active": false,
  "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
          }
        ]
      ]
    }
  }
}