Results 1 to 1 of 1
Hello all,
I'm really new to using linux, so go easy on me.
I have a NAS, running debian linux. I have enabled ssh connection and installed (amongst others) an ...
- 04-17-2011 #1Just Joined!
- Join Date
- Apr 2011
- Posts
- 1
daily download from ftp server to NAS running debian linux
Hello all,
I'm really new to using linux, so go easy on me.
I have a NAS, running debian linux. I have enabled ssh connection and installed (amongst others) an ftp client. (ncftp)
What I would want to do is have this client download from an ftp server to the disk on a daily basis.
On the ftp server there are a lot of files, with a regular naming principle, eg:
document.v1.randomtexthere.docx
document.v1.randomtexthere.doc
document.v2.someothername.docx
document.v3.stuff.docx
paper.v1.shizzle.docx
paper.v2.whatever.docx
I would like to download only a few of those file-series. In our example: I want to download all the documents.*.docx but not paper.*.docx nor documents.*.doc.
Of course I can use the wild-card usage above to select the files I want.
However, I want to download only the new ones. My thought process thus far was: I want to have them all, but some older versions will already be on my disk, so the default file exists action should be skip(all).
In our example I would already have document.v1.randomtexthere.docx and document.v2.someothername.docx on my disk.
The problem with skip could be that an incomplete download would mess things up (because I want the complete files, not half of them because the NAS turned off while downloading by accident or something)
What I was thinking, is that this should be possible using ncftp job files, and using "post-shell-command" to create a new job file for the following day.
However, I don't know how I would be able to get that to work (here my inexperience with linux plays a role.)
Maybe there is a better way, I'm open for suggestions.


Reply With Quote
