7

I have the following command:

lftp -e 'mirror -R /local/backups /' -u username,password ftp://FTP_SERVER

this works fine, until I started cleaning the /local/backups folder. I'd like to upload new files to my FTP_SERVER without deleting those which don't exist locally anymore.

I've tried the additional flags:

--only-missing
--only-newer

but neither is working. Is it at all possible? I know rsync has such an option, but that doesn't work with FTP servers.

peter
  • 173
  • 1
  • 1
  • 5
  • Yes, it doesn't look like mirror is the right thing. Possibly `--skip-noaccess` could work. Otherwise you might need to build an explicit file list rather than using `-R`. – Ralph Rönnquist Apr 24 '16 at 22:32

1 Answers1

17

lftp mirror command does not remove files by default, only if you add -e or --delete options.

To confirm that, use mirror --dry-run option.

lav
  • 463
  • 4
  • 9