← All projects
Completed August 2026

FTPRemoteSync

An incremental Raspberry Pi backup that nightly pulls only the changed files from a remote (FTP-exposed) NAS and stores them on a local NAS.

BashRaspberry PilftpBackupSelf-hosted

The goal

Keep a safety copy of the data on a NAS that lives at another location, saving it automatically onto a local NAS. The idea is an off-site backup with no manual work, transferring only what has actually changed each time.

How it works

A small Raspberry Pi sits between the two NASes:

  1. It mounts the local NAS (over CIFS/SMB or NFS) as a system folder.
  2. It connects to the remote NAS over FTP and, using lftp mirror, downloads only the files that are new or changed since the last run (--only-newer), in parallel.
  3. It runs every night via cron and writes one log per run, with automatic rotation.

The remote NAS sits behind a home connection with no reachable public IP: the two sites are linked by a private site-to-site VPN, so the Pi can reach it as if it were on the local network.

Configuration

All behaviour lives in a single JSON file: the list of folders to copy (each entry maps a remote path to a local one), the number of parallel transfers, and how many days of logs to keep. The NAS and FTP credentials live in separate, root-only files (mode 600), kept out of the config.

Design choices

Stack

Raspberry Pi · Bash · lftp · cron · CIFS/NFS · logrotate · jq