Comments (15)
I started using your program and it really seems great. I was wondering though whether using rsync is of any
advantage for this in terms of bandwidth as I have noticed it to be quite slow.
You will get a little speedup only downloading from the server to your host. Drive API doesn't support partial uploads, so using rsync won't get you quicker uploads.
also, the mime type of the PDF according to Google is application/octet-stream.
Which version are you using?
from google-drive-ocamlfuse.
Would the partial file transfers of rsync ever cause issues with the Drive API?
As for the version, I am using version 0.4.5 from Ubuntu's PPA.
from google-drive-ocamlfuse.
The problem is that rsync copies the files using temporary random names (e.g. .filename.pdf.0MN9tN). But I choose the content type from the file extension, and when the file is uploaded, the extension is wrong. I can try to change the content type when the file is renamed, but I don't know if it's enough. I'll let you know if it works.
from google-drive-ocamlfuse.
I made a test and it didn't work. It seems a problem on the Drive API side (see http://stackoverflow.com/questions/14629839/unable-to-update-mimetype-using-google-drive-api). The only workaround is to reupload the file, but this way you will upload all files 2 times.
from google-drive-ocamlfuse.
Thanks for the quick reply.
Does that mean that using rsync
(with its default settings) is incompatible with google-drive-ocamlfuse
?
from google-drive-ocamlfuse.
Not exactly, there are issues using rsync
to upload files, but it works pretty well as a backup tool, to backup the content of your Drive on your host (I'm using it this way).
from google-drive-ocamlfuse.
Looking at rsync
manual, I found the --inplace
option, that avoids creating temporary files. Maybe you can try it to see if using that option, the file MIME type is set to application/pdf
.
from google-drive-ocamlfuse.
For what it's worth, adding the --inplace
option to rsync
seems to have fixed this issue for me. I can't be totally certain, because sometimes it worked even before, so maybe I'm just getting lucky.
For other Googlers, here's the line in my crontab -e
0 * * * * date >> ~/drive-rsync-stats.log && rsync -trluhv --delete --stats --inplace /folder/to/upload/* /folder/mounted/with/google-drive-ocamlfuse/ >> ~/drive-rsync-stats.log
I'm using this so that I can access files from my main computer from all my other devices, so I don't care if this command clobbers stuff on Drive. Working great for me running every hour on my machine.
@astrada this thing is baller.
from google-drive-ocamlfuse.
I had the same issue with image files when I used rsync. After adding "--inplace" argument, backup to Google Drive via google-drive-ocamlfuse works perfect with rsync. Thanks @astrada
from google-drive-ocamlfuse.
Sorry to comment a closed issue, still this is the best thread I've found on using rsync on google-drive-ocamlfuse (imho some suggestions of this issue should be promoted to a wiki page, @astrada I'd gladly help)
I generally see everyone experiencing some vaguely defined "slow" rating but I can't find something more specific: I'm uploading files with rsync at something less than 1.4 Mbps, I'm wondering:
- is this considered "normal"?
- are there any fine tunings that can increase upload speed? (besides the
--inplace
option) - (slightly OT) is this slowness due to google drive's api in general (meaning: there's no other way to significantly increase transfer speed to/from google drive)?
I'm aware that (quoting this interesting thread) there hasn't been a "clear statement from Google's side about what upload speed is expected" so I guess it's difficult to talk numbers.
from google-drive-ocamlfuse.
imho some suggestions of this issue should be promoted to a wiki page, @astrada I'd gladly help
Sure! Feel free to create a new wiki page. Thanks!
is this considered "normal"?
I'm sorry, but I don't have a very stable connection (I'm on LTE that has very variable upload rate) so I can't measure a "normal" speed.
are there any fine tunings that can increase upload speed? (besides the --inplace option)
You can test these options:
- you can set a very high timeout in
metadata_cache_time=
so your cache doesn't risk to be invalidated - you can try multi-threading with
-m
(I'm still testing this option so it's not yet super-stable) even if rsync is single-theaded (but you can test parallel) - I'm still looking for some way to increase the maximum FUSE block size (that is 128KB)
(slightly OT) is this slowness due to google drive's api in general (meaning: there's no other way to significantly increase transfer speed to/from google drive)?
I'm experiencing very variable transfer rates too, but I'm not sure this is due to Google or to my 4G provider.
from google-drive-ocamlfuse.
Thank you,
wiki page created
I'm trying your suggestions, the rsync + parallel experiment went wrong: I was using this approach but after a while I got a lot of:
rsync error: errors selecting input/output files, dirs (code 3) at main.c(634) [Receiver=3.1.0]
rsync: ERROR: cannot stat destination "/my/ocamlfuse/mount/path": Transport endpoint is not connected (107)
Right now I've launched manually two separate instances of rsync on different subpath, so far so good but I'm not sure if this is affecting transfer speed
from google-drive-ocamlfuse.
wiki page created
Nice, thanks.
rsync: ERROR: cannot stat destination "/my/ocamlfuse/mount/path": Transport endpoint is not connected (107)
OK, I will do a couple of tests.
Thanks for your feedback.
from google-drive-ocamlfuse.
It seems that the performance issues (and the "transport endpoint is not connected") might be related to the fact that I'm behind a ntlm authenticated proxy (I'm sorry I didn't mention that earlier, my bad). I repeated the test on the same network bypassing the proxy and speed improved greatly.
After around 100GB of data transfer I experienced a:
Device or resource busy (16)
rsync error: error in file IO (code 11) at receiver.c(856) [receiver=3.1.0]
But in that particular server I haven't still changed the metadata_cache_time
, maybe it's because of that (?)
from google-drive-ocamlfuse.
But in that particular server I haven't still changed the metadata_cache_time, maybe it's because of that (?)
No, I don't think so. It's probably a bug (if you are using multi-threading) or (less likely) you received too many errors server side (each request is retried at most 10 times).
from google-drive-ocamlfuse.
Related Issues (20)
- "This file has been locked by another user." LibreOffice.
- out of band flow migration issue HOT 1
- Access multiple folders within a team-drive
- Disable Google App Engine OAuth proxy HOT 1
- Deadlocked file managers HOT 1
- Does not copy content correctly
- Using app password instead of OAuth HOT 1
- Unable to mount Drive without OAuth 2.0 HOT 1
- Documentation: Update wiki/Usage documentation with note that secret credentials will be stored in bash/zsh/etc history HOT 1
- Authorization fails if a process is already bound to 127.0.0.1:8080 HOT 1
- Mounting Google Drive no longer works after changing password. HOT 2
- Mount failing with segfault after updating Ubuntu 22.04 HOT 13
- Question: how to configure systemd to unload/load service on suspend/resume
- not logging in after update HOT 6
- Google has made access to this f*cking impossible HOT 4
- Google complains about invalid request
- The "fusermount -u" operation to unmount needs to be added to 'man' documentation
- Error in access date of files mounted with GD-Ocamlfuse
- Mounted drive disappears HOT 7
- How to mount shared srives
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from google-drive-ocamlfuse.