To back up a local folder to an FTP server, you must use a configuration file (config.toml), as FTP credentials cannot be passed directly through the command line.
1. Create a config.toml file
Create a file named config.toml with your storage and job settings:
config_id = "ftp_backup_example"
# Define your local source folder
[storage.local_source]
type = "local_drive"
base_dir = "C:\\path\\to\\my_folder"
# Define your remote FTP storage
[storage.ftp_remote]
type = "ftp"
server = "ftp.example.com"
port = 21
user = "your_username"
password = "your_password"
base_dir = "/backups/my_folder"
# Define the backup job
[job.my_ftp_job]
backup_from = "local_source"
send_to = "ftp_remote"
full_backup = false # When true, forces a full backup. Otherwise, performs an incremental backup if a full backup has already been completed.
compare_file_hashes = true # If true, uses file hashes to detect changes; otherwise, uses file size and modification time.
2. Run the backup
Open your terminal and run the backup command specifying your job name and the config file:
diffzipsend backup my_ftp_job --config config.toml
The --config argument is optional. See Under the Hood for more details on default configuration locations.
3. Restore the data
To restore the latest version of your data back to the local folder:
diffzipsend restore my_ftp_job --config config.toml
Optional: Restore to a different folder
If you want to restore to a different location:
diffzipsend restore my_ftp_job to "C:\\path\\to\\restore_folder" --config config.toml
Optional: Restore to a specific point in time
If you have multiple backups and want to restore a specific one:
diffzipsend restore my_ftp_job at 20260412135200 --config config.toml
# or
diffzipsend restore my_ftp_job at 2026-04-12T13:52:00 --config config.toml