Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

owncloud's webdav: preserve timestamps #237

Closed
drzraf opened this issue May 14, 2016 · 9 comments
Closed

owncloud's webdav: preserve timestamps #237

drzraf opened this issue May 14, 2016 · 9 comments

Comments

@drzraf
Copy link

drzraf commented May 14, 2016

According to this owncloud/core#20873
ownCloud webdav implementation allow timestamp preservation.
Do you think that would be hard to implements in the lftp mirror command?
(bonus, would it be possible to make mirror "fix" timestamps of remote files already uploaded?)

@lavv17
Copy link
Owner

lavv17 commented May 15, 2016

I'll add the header X-OC-mtime, no problem, but they could just accept the
standard Last-modified header.

сб, 14 мая 2016, 5:33 Raphaël Droz notifications@github.com:

According to this owncloud/core#20873
owncloud/core#20873
ownCloud webdav implementation allow timestamp preservation.
Do you think that would be hard to implements in the lftp mirror command?
(bonus, would it be possible to make mirror "fix" timestamps of remote
files already uploaded?)


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#237

@drzraf
Copy link
Author

drzraf commented May 15, 2016 via email

@drzraf
Copy link
Author

drzraf commented May 18, 2016

How would I restore remote timestamps without re-uploading every file?
(rsync can do it ;))

@drzraf
Copy link
Author

drzraf commented May 18, 2016

Got it working using cadaver:
{ echo "set namespace DAV:"; find . -type f -path './201*' | xargs -n 1 stat -c "propset %n lastmodified %Y"; } | cadaver http://xxxx.owncube.com/remote.php/webdav/

According to https://github.com/cernbox/smashbox/blob/master/protocol/protocol.md, the X-OC-MTime is here only to avoid another PROPSET/PROPATCH request after the PUT.
Even if it's suboptimal when server supports X-OC-MTime, lftp could use the more standard PROPSET call for non-ownCloud webdav backend, but that's another story.

@lavv17
Copy link
Owner

lavv17 commented May 18, 2016

mirror -c may help to update timestamps, but I'm not sure it would work for
owncloud.

ср, 18 мая 2016, 17:27 Raphaël Droz notifications@github.com:

Got it working using cadaver:
{ echo "set namespace DAV:"; find . -type f -path './201*' | xargs -n 1
stat -c "propset %n lastmodified %Y"; } | cadaver
http://xxxx.owncube.com/remote.php/webdav/

According to
https://github.com/cernbox/smashbox/blob/master/protocol/protocol.md, the
X-OC-MTime is here only to avoid another PROPSET/PROPATCH request after
the PUT.
Even if it's suboptimal when server supports X-OC-MTime, lftp could use
the more standard PROPSET call for non-ownCloud webdav backend, but that's
another story.


You are receiving this because you modified the open/close state.

Reply to this email directly or view it on GitHub
#237 (comment)

@drzraf
Copy link
Author

drzraf commented May 26, 2016 via email

@lavv17
Copy link
Owner

lavv17 commented Jun 1, 2016

I have created webdav-proppatch branch which sends PROPPATCH after PUT (if X-OC-MTime was not successful).

I don't have access to any OC server to test it. Please test if you can.

@drzraf
Copy link
Author

drzraf commented Jun 1, 2016

wow, that's a huge patch. thank you!
Since I mostly use ownCloud in ownCube, X-OC-MTime is going to be accepted so it'll be hard for me to test this code-path.
May I suggest that refactoring-related hunks are done in master and that only the proppatch stuff go in its branch? It may help in case this branch takes time before being merged.

@lavv17
Copy link
Owner

lavv17 commented Jun 5, 2016

For testing purposes you can always comment out the "accepted" branch of
code.

ср, 1 июня 2016, 17:01 Raphaël Droz notifications@github.com:

wow, that's a huge patch. thank you!
Since I mostly use ownCloud in ownCube, X-OC-MTime is going to be accepted
so it'll be hard for me to test this code-path.
May I suggest that refactoring-related hunks are done in master and that
only the proppatch stuff go in its branch? It may help in case this branch
takes time before being merged.


You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub
#237 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AA67XCMJ56ccg4vXPboRlXm13Ehe8d_Iks5qHZCtgaJpZM4IegVV
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants