You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
760 B
Bash

3 years ago
#!/usr/bin/env bash
# get variable from .env file
if [ -f .env ]
then
export $(cat .env | xargs)
fi
3 years ago
# https://lftp.yar.ru/lftp-man.html
# -R, --reverse reverse mirror (put files)
# -n, --only-newer download only newer files (-c won't work)
# -e, --delete delete files not present at the source
# -v, --verbose[=level] verbose operation
# --parallel[=N] download N files in parallel
# note: the number of maximum parallels connections accepted by the ftp can vary, if you get an error reduce it.
lftp -e "set ssl:verify-certificate false; open $FTP_HOST; user $FTP_USERNAME $FTP_PASSWORD; mirror -Rnev --ignore-time --parallel=4 ./output /www/moonwalks.be ; bye"