Skip to content

Instantly share code, notes, and snippets.

@Hikari9
Last active July 8, 2022 16:31
Show Gist options
  • Save Hikari9/dcecb9a149d2b78224ff to your computer and use it in GitHub Desktop.
Save Hikari9/dcecb9a149d2b78224ff to your computer and use it in GitHub Desktop.
Upload files using FTP
#!/bin/bash
HOST='ftp.domain.com'
USER='[email protected]'
SOURCE='/path/to/folder/with/ending/slash/'
TARGET='/path/to/dest/'
lftp -f "
set ftp:ssl-force false
set ssl:verify-certificate no
open $HOST
user $USER
lcd $SOURCE
mirror --reverse --delete --verbose --parallel --exclude /.git $SOURCE $TARGET
bye
"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment