tags:

views:

306

answers:

3

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.

A: 

echo ftp://user%[email protected] | wget -i -

or use .netrc to store passwords

or don't use wget?

Jayen
+1  A: 

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.)

Benjamin Oakes
I did end up going with rsync. The manpage told me just about everything I needed to know, though I ended up having to specify the location of my keys with the "-i" (eye) flag.
joebert
A: 

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.

ewall