You are not logged in.

#1 2004-09-21 01:54:52

neotuli
Lazy Developer
From: San Francisco, CA
Registered: 2004-07-06
Posts: 1,201
Website

FTP protocol help

Ok, so on the side I'm trying to work on this little project which would sync up my documents at school with those at home. The school offers FTP access to those files. The problem I have, however, is that I don't know how to make it keep the modification times on files that are uploaded. Uploaded files appear to take the time at which they were uploaded as mtimes,ctimes, and all other times, which is a problem in this case since it would make remote files always appear newer than local files. Any suggestions on how I could preserve the local mtimes during the upload?


The suggestion box only accepts patches.

Offline

#2 2004-09-21 06:26:17

oscar
Member
From: Linköping, Sweden
Registered: 2004-08-13
Posts: 457

Re: FTP protocol help

I think you should check out rsync - I don't know much about it myself, but I think I know what it can do :]


To err is human... to really foul up requires the root password.

Offline

#3 2004-09-21 13:02:40

Hum
Member
Registered: 2004-06-13
Posts: 46

Re: FTP protocol help

nice timing there's an article on osnews today about rsyncing to your hard drive. smile

Offline

#4 2004-09-21 21:41:18

oscar
Member
From: Linköping, Sweden
Registered: 2004-08-13
Posts: 457

Re: FTP protocol help

Hum wrote:

nice timing there's an article on osnews today about rsyncing to your hard drive. smile

haha ^_^
I have never read anything on osnews, I stick to slashdot and a few swedish nerd sites smile


To err is human... to really foul up requires the root password.

Offline

#5 2004-09-22 03:13:35

neotuli
Lazy Developer
From: San Francisco, CA
Registered: 2004-07-06
Posts: 1,201
Website

Re: FTP protocol help

rsync doesnt appear to support anything other than an rsync server at the other end, in my situation, the only interface offered is FTP  :?


The suggestion box only accepts patches.

Offline

#6 2004-09-22 09:13:41

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Offline

#7 2004-09-30 02:21:57

thegeekster
Member
Registered: 2004-09-25
Posts: 7

Re: FTP protocol help

Actually, all you need is wget, which can mirror via http or ftp, and allows for replicatiing the directory structure, or not even use a directory structure and put everything in one directory..........This can be run as a cron job, and will only retirieve files that have been modified.........

Although, rsync would be faster for retrieving modified files, since it doesn't send the whole file, but only the diffs.........And you don't need to go through an rsync server, instead you can tunnel it through ssh.........The caveats to this are you need to know a little about using ssh (which is really quite easy), you need a user account on the machine with access to the docs on the machine you are retrieving them from, and create a ssh private/public key pair to automate the login process......

smile
---thegeekster


Open Source, it's about freedom of choice.......
---/me

A computer will do what you tell it to, but that may be much different from what you had in mind.
---Joseph Weizenbaum

Offline

#8 2004-09-30 05:57:30

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,615
Website

Re: FTP protocol help

I don't think  his issue is the mirroring aspect. I believe his issue, as he stated it, was that when he uploads a file to the school server, it changes the timestamp.

And, unfortunately, I can't think of a way offhand to get around this problem..
I honestly never use ftp anyway..it is so broken.
Doesn't your school provide you with ssh?


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#9 2004-09-30 08:51:13

thegeekster
Member
Registered: 2004-09-25
Posts: 7

Re: FTP protocol help

You're right, cactus............so the best solution offhand is to rsync via ssh, if possible........it's like creating a backup to a remote server...

neotuli, if you have an user account at the school, then you might be able to connect via ssh, if the school servers are a 'Nix type of operating system and they're not blocking the ssh port (which is may be unlikely since the SysAdmin may be using ssh to maintain them remotely)........If this is so, you may be able to log onto the school via ssh, using your account username and passwd givng you the same priveleges you normally have.......if you can do that, then you can use rsync to upload the files to your school account without the need of a rsync server at the school........Check with the school's SysAdmin to see if this is possible.......

smile
---thegeekster


Open Source, it's about freedom of choice.......
---/me

A computer will do what you tell it to, but that may be much different from what you had in mind.
---Joseph Weizenbaum

Offline

#10 2004-09-30 23:17:38

neotuli
Lazy Developer
From: San Francisco, CA
Registered: 2004-07-06
Posts: 1,201
Website

Re: FTP protocol help

They use novell crap, I portscanned them, no ssh stuff open :-/ , and I doubt I can convince them to add it. It's not like I'm talking about a university btw..it's just my highschool...


The suggestion box only accepts patches.

Offline

#11 2004-09-30 23:48:17

skoal
Member
From: Frequent Flyer Underworld
Registered: 2004-03-23
Posts: 612
Website

Re: FTP protocol help

neotuli wrote:

They use novell crap, I portscanned them, no ssh stuff open :-/ , and I doubt I can convince them to add it. It's not like I'm talking about a university btw..it's just my highschool...

An indirect workaround which I've used before in a similiar case to yours, is:

1. Having 1 (only 1) tar archive containing all your files.

2. On your local machine, add the new files to the tar archive (which should preserve the timestamps as well).

3. Upload your tarball to the remote machine.  It will put a different timestamp on that tarball, but who cares about that.

4. On the remote winclient you use at school, when you modify a file, just add only that file back to the tar archive.  I believe WinZip handles tar archives nicely.

5. When you need to get something off the remote machine, get that tarball back, untar with replace only newer files option.  I don't remember that tar option, or if it's default.

* Basically, I just remember having 1 tarball (repository if you wish) that had all my files in it.  Whether I was just adding 1 or 30 new files to the remote machine, I tar'ed em up first in my tarball repo and then sent that tarball instead of individual files.

Not elegant, but it worked for me.  Of course, if you are on a slow connection, as that tarball grows, so will the time needed to get/put them.  In that case, maybe as your tarball grows, break your repo tarball up into several smaller ones defined by some category, much like how Arch has different repo's.

Offline

#12 2004-10-01 03:28:42

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,615
Website

Re: FTP protocol help

too bad they don't have ssh..with that there are so many options..
hell, you could just use cvs!
lol


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

Board footer

Powered by FluxBB