I'm trying to mirror a website (of which I'm the webmaster) using LFTP, for backup.
I use the LFTP command (actual paths, usernames, and passwords redacted for privacy):
mirror -e -p --verbose=1 /public_html /mnt/lobster3raid//public_html
It's working except that LFTP is removing each file from the mirror and then re-transferring it, even if it hasn't changed on the webserver (I get this on every single file every time):
Removing old file `/IMG_2003.jpg'
Transferring file `/IMG_2003.jpg'
Removing old file `/IMG_2004.jpg'
Transferring file `/IMG_2004.jpg'
Removing old file `/IMG_2005.jpg'
Transferring file `/IMG_2005.jpg'
**How can I run a LFTP mirror that only transfers changed/newer files?**
More background:
The destination mirror is on a Windows share at \\\LOBSTER3\raid. I'm doing this on Windows. I had it working OK with Cygwin's LFTP for a while, but lately have been getting permission problems from Windows (apparently Cygwin's LFTP is setting permissions Windows doesn't like).
So I'm now using the LFTP in wsl (Ubuntu). I run this batch file from Windows:
wsl -u root -- mkdir /mnt/lobster3raid
wsl -u root -- mount -t drvfs \\\\lobster3\\raid /mnt/lobster3raid
wsl -- lftp -u , -e 'set ssl:check-hostname no; mirror -e -p --verbose=1 /public_html /mnt/lobster3raid/mirrors/1day/public_html'
Asked by nerdfever.com
(303 rep)
May 20, 2022, 01:35 AM
Last activity: May 10, 2023, 06:59 PM
Last activity: May 10, 2023, 06:59 PM