Question

I'm looking for a secure alternative to doing something like this,

wget --mirror --preserve-permissions --directory-prefix=/hdd2/website-backups --exclude-directories=special,stats --ftp-user=user --ftp-password=pass ftp://ftp.domain.com

It's executed via cron.

The "--mirror" switch in that is important to me.

Was it helpful?

Solution

Have you tried rsync? (I've never tried it with FTP before, but I'd expect that something could be done. Definitely works with SFTP/SSH.)

OTHER TIPS

Not sure what you mean by "secure" here--you mean you'd like support for SFTP or FTPS?

If so, you could use Curl--but it doesn't do the recursive mirroring on its own; you'll need a script to do that.

Or there are other similar tools--here's a comparison chart where you might find one that fits the features you need.

echo ftp://user:password@ftp.domain.com | wget -i -

or use .netrc to store passwords

or don't use wget?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top