mstadlmeier / drivesync Goto Github PK
View Code? Open in Web Editor NEWGoogle Drive synchronization for Linux
License: MIT License
Google Drive synchronization for Linux
License: MIT License
From drive.google.com, settings > manage apps > drivesync > disconnect from drive.
Natually, drivesync no longer has access to my account, but I don't see any way to request that authorization again.
Hi!
Is that possible to sync only selected folders/files?
Thank you in advance!
Drivesync works fine. For many months, these four error messages have appeared:
I use the unstable Debian kernel, which tomorrow might be different, but today is: 10.0-3-amd64 #1 SMP Debian 5.10.13-1 (2021-02-06) x86_64 GNU/Linux.
Ruby is version 1:2.7+2. I don't know what version ruby-gems is, because it was not installed from the distro's repository.
There are no performance problems. Thank you for creating Drivesync!
Hi !
Is it possible to move the configuration to the folder .config and then to have ~/.config/drivesync/config.yml ?
Thank you
Hi.
I have problems with Drivesync and I would like to uninstall it to install it again. How can I do it?
Thanks.
After syncing, I got this warning:
drivesync.rb:11: warning: calling URI.open via Kernel#open is deprecated, call URI.open directly or use URI#open
--
OS: Ubuntu 20.04 LTS x86_64
Kernel: 5.4.0-39-generic
DE: GNOME
If google drive has additional shared drives his not synced.
Synced only files in MyDrive folder.
Hi. First sry English isnt my native language.
I always use Your script in Ubuntu 18.04.4 and there it works with no problems.
I just fresh installed Ubuntu 20.04 and have little issue.
drivesync works ( syncing well ) but here always many errors:
ruby drivesync.rb /var/lib/gems/2.7.0/gems/mime-types-3.1/lib/mime/types/logger.rb:28: warning:
_1' is reserved for numbered parameter; consider another name
/var/lib/gems/2.7.0/gems/mime-types-3.1/lib/mime/types/logger.rb:28: warning: _2' is reserved for numbered parameter; consider another name /var/lib/gems/2.7.0/gems/mime-types-3.1/lib/mime/types/logger.rb:28: warning:
_3' is reserved for numbered parameter; consider another name
/var/lib/gems/2.7.0/gems/faraday-0.15.2/lib/faraday/options.rb:166: warning: Capturing the given block using Proc.new is deprecated; use &block
instead
/var/lib/gems/2.7.0/gems/faraday-0.15.2/lib/faraday/options.rb:166: warning: Capturing the given block using Proc.new is deprecated; use &block
instead
/var/lib/gems/2.7.0/gems/faraday-0.15.2/lib/faraday/options.rb:166: warning: Capturing the given block using Proc.new is deprecated; use &block
instead
/var/lib/gems/2.7.0/gems/faraday-0.15.2/lib/faraday/options.rb:166: warning: Capturing the given block using Proc.new is deprecated; use &block
instead
/var/lib/gems/2.7.0/gems/faraday-0.15.2/lib/faraday/options.rb:166: warning: Capturing the given block using Proc.new is deprecated; use &block
instead
/var/lib/gems/2.7.0/gems/multi_json-1.13.1/lib/multi_json/options_cache.rb:12: warning: Capturing the given block using Proc.new is deprecated; use &block
instead
Local folder is 1 files behind and 0 files ahead of remote
Starting sync at 2020-04-27 18:01:48 +0200
Downloading file baza/Hasła.kdbx ...
Sync complete.
drivesync.rb:11: warning: calling URI.open via Kernel#open is deprecated, call URI.open directly or use URI#open
Here linkt to pastebin
https://pastebin.com/gGijwruz
Cheers
I am running Arch Linux. Whenever I try to run drivesync I get the following error
Traceback (most recent call last):
1: from <internal:gem_prelude>:2:in `<internal:gem_prelude>'
<internal:gem_prelude>:2:in `require': cannot load such file -- rubygems.rb (LoadError)
Hello!
Here is a crash during initial sync with syspend resume.
Downloading file .encfs/NmrQM-ZiuEslkdRee437XXTB/J-K6K3ee9gtpdjA4n1nbzJkRRTEqxCcQWoqBotn4FXTHN,/i805m1NMpytudSkYE2QMAaloaLFKnfK9NKCjaJPyWNekF-/Lg0Rzs858ZPG2DKke7BKdl6J/c-qluFY6bppY3l7bTqK9qnpy/HpbXdxf0QF1gAyBtEY1ySmSo/YHstEBlucUbgxM-UdgaZj6gjX2G-E7upS3CxI3yflUImTuqBDLueHKh0UkE9denuln8 ...
Traceback (most recent call last):
36: from /home/axet/local/drivesync/drivesync.rb:64:in `<main>'
35: from /home/axet/local/drivesync/drivesync.rb:23:in `sync'
34: from /home/axet/local/drivesync/src/synchronizer.rb:71:in `run'
33: from /home/axet/local/drivesync/src/synchronizer.rb:267:in `sync'
32: from /home/axet/local/drivesync/src/synchronizer.rb:267:in `each'
31: from /home/axet/local/drivesync/src/synchronizer.rb:270:in `block in sync'
30: from /home/axet/local/drivesync/src/synchronizer.rb:151:in `download_file'
29: from /home/axet/local/drivesync/src/drive_manager.rb:99:in `download'
28: from /var/lib/gems/2.5.0/gems/google-api-client-0.23.4/generated/google/apis/drive_v3/service.rb:792:in `get_file'
27: from /var/lib/gems/2.5.0/gems/google-api-client-0.23.4/lib/google/apis/core/base_service.rb:360:in `execute_or_queue_command'
26: from /var/lib/gems/2.5.0/gems/google-api-client-0.23.4/lib/google/apis/core/http_command.rb:93:in `execute'
25: from /var/lib/gems/2.5.0/gems/retriable-3.1.2/lib/retriable.rb:56:in `retriable'
24: from /var/lib/gems/2.5.0/gems/retriable-3.1.2/lib/retriable.rb:56:in `times'
23: from /var/lib/gems/2.5.0/gems/retriable-3.1.2/lib/retriable.rb:61:in `block in retriable'
22: from /var/lib/gems/2.5.0/gems/google-api-client-0.23.4/lib/google/apis/core/http_command.rb:101:in `block in execute'
21: from /var/lib/gems/2.5.0/gems/retriable-3.1.2/lib/retriable.rb:56:in `retriable'
20: from /var/lib/gems/2.5.0/gems/retriable-3.1.2/lib/retriable.rb:56:in `times'
19: from /var/lib/gems/2.5.0/gems/retriable-3.1.2/lib/retriable.rb:61:in `block in retriable'
18: from /var/lib/gems/2.5.0/gems/google-api-client-0.23.4/lib/google/apis/core/http_command.rb:104:in `block (2 levels) in execute'
17: from /var/lib/gems/2.5.0/gems/google-api-client-0.23.4/lib/google/apis/core/download.rb:77:in `execute_once'
16: from /var/lib/gems/2.5.0/gems/httpclient-2.8.3/lib/httpclient.rb:743:in `get'
15: from /var/lib/gems/2.5.0/gems/httpclient-2.8.3/lib/httpclient.rb:854:in `request'
14: from /var/lib/gems/2.5.0/gems/httpclient-2.8.3/lib/httpclient.rb:1104:in `follow_redirect'
13: from /var/lib/gems/2.5.0/gems/httpclient-2.8.3/lib/httpclient.rb:1014:in `do_request'
12: from /var/lib/gems/2.5.0/gems/httpclient-2.8.3/lib/httpclient.rb:1133:in `protect_keep_alive_disconnected'
11: from /var/lib/gems/2.5.0/gems/httpclient-2.8.3/lib/httpclient.rb:1019:in `block in do_request'
10: from /var/lib/gems/2.5.0/gems/httpclient-2.8.3/lib/httpclient.rb:1245:in `do_get_block'
9: from /var/lib/gems/2.5.0/gems/httpclient-2.8.3/lib/httpclient.rb:1299:in `do_get_header'
8: from /var/lib/gems/2.5.0/gems/httpclient-2.8.3/lib/httpclient/session.rb:561:in `get_header'
7: from /var/lib/gems/2.5.0/gems/httpclient-2.8.3/lib/httpclient/session.rb:784:in `read_header'
6: from /var/lib/gems/2.5.0/gems/httpclient-2.8.3/lib/httpclient/session.rb:801:in `parse_header'
5: from /usr/lib/ruby/2.5.0/timeout.rb:103:in `timeout'
4: from /var/lib/gems/2.5.0/gems/httpclient-2.8.3/lib/httpclient/session.rb:805:in `block in parse_header'
3: from /var/lib/gems/2.5.0/gems/httpclient-2.8.3/lib/httpclient/ssl_socket.rb:62:in `gets'
2: from /usr/lib/ruby/2.5.0/openssl/buffering.rb:207:in `gets'
1: from /usr/lib/ruby/2.5.0/openssl/buffering.rb:57:in `fill_rbuff'
/usr/lib/ruby/2.5.0/openssl/buffering.rb:57:in `sysread': execution expired (Google::Apis::TransmissionError)
Hi, I wondering this app, but I miss some king of log file, like diff output, to show what is running in background, wich files are synced locally and wich files are synced remotely. Thanks.
First of all, I love drivesync! It does everything I want.
But when I want to sync my files, some german letters (ä,ü,ö etc) cause some conversion errors.
Uploading file SchuleAktuellZorin/Bio/Ökosysteme/ÖkosystemFließgewässer.pdf.xopp ...
/home/USER/.rvm/gems/ruby-2.7.0/gems/multi_json-1.13.1/lib/multi_json/options_cache.rb:12:_ warning: Capturing the given block using Proc.new is deprecated; use&block
instead
Traceback (most recent call last):
20: from drivesync.rb:65:in<main>' 19: from drivesync.rb:24:in
sync'
18: from /home/katlem/drivesync/src/synchronizer.rb:71:inrun' 17: from /home/katlem/drivesync/src/synchronizer.rb:279:in
sync'
16: from /home/katlem/drivesync/src/synchronizer.rb:279:ineach' 15: from /home/katlem/drivesync/src/synchronizer.rb:282:in
block in sync'
14: from /home/katlem/drivesync/src/synchronizer.rb:166:inupload_file' 13: from /home/katlem/drivesync/src/drive_manager.rb:108:in
upload'
12: from /home/katlem/drivesync/src/drive_manager.rb:178:intraverse_and_create' 11: from /home/katlem/drivesync/src/drive_manager.rb:178:in
each'
10: from /home/katlem/drivesync/src/drive_manager.rb:181:inblock in traverse_and_create' 9: from /home/katlem/drivesync/src/drive_manager.rb:167:in
create_folder'
8: from /home/katlem/.rvm/gems/ruby-2.7.0/gems/google-api-client-0.23.4/generated/google/apis/drive_v3/service.rb:601:increate_file' 7: from /home/katlem/.rvm/gems/ruby-2.7.0/gems/google-api-client-0.23.4/lib/google/apis/core/base_service.rb:360:in
execute_or_queue_command'
6: from /home/katlem/.rvm/gems/ruby-2.7.0/gems/google-api-client-0.23.4/lib/google/apis/core/http_command.rb:91:inexecute' 5: from /home/katlem/.rvm/gems/ruby-2.7.0/gems/google-api-client-0.23.4/lib/google/apis/core/api_command.rb:64:in
prepare!'
4: from /home/katlem/.rvm/gems/ruby-2.7.0/gems/representable-3.0.4/lib/representable/json.rb:44:into_json' 3: from /home/katlem/.rvm/gems/ruby-2.7.0/gems/multi_json-1.13.1/lib/multi_json.rb:139:in
dump'
2: from /home/katlem/.rvm/gems/ruby-2.7.0/gems/multi_json-1.13.1/lib/multi_json/adapter.rb:25:indump' 1: from /home/katlem/.rvm/gems/ruby-2.7.0/gems/multi_json-1.13.1/lib/multi_json/adapters/json_common.rb:21:in
dump'
/home/katlem/.rvm/gems/ruby-2.7.0/gems/multi_json-1.13.1/lib/multi_json/adapters/json_common.rb:21:in `to_json': "\xC3" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError)
I have not changed anything else in the code and when I rename the file, the syncing works without problems.
I resently changed distros from ubuntu based, where everything worked fine, to an Arch based, and kept the home directory (if that is useful)
Thanks in advance for anything! If some more files or more information is needed i'l provide them as quickly as I can!
Hi,
I'm using your very userful tool for backup my database dumps into the gdrive space.
Starting from 1 month, it seems that nothing works 'cause "authorization denied".
I checked into the Google Account, and I see that "enable not secure app" was disabled.
I reactivated it, but when I try to obtain a new token, Google says me that it's not possible.
Do you know something about it? Is there a chance to use your tool with "secure app" feature?
Thanks,
Mariano
Is this supporting partial sync of folders?
I've tried multiple times now to use this program, but when I use an already filled, but slightly outdated local Google Drive folder as the path to sync to, it thinks that that is the latest state and starts deleting files remotely. But when I start with an empty folder, then it downloads for a while, last time it was 2-3 hours, then gives the following error message:
/var/lib/gems/2.3.0/gems/google-api-client-0.9.20/lib/google/apis/core/http_command.rb:211:in `check_status': Invalid request (Google::Apis::ClientError)
from /var/lib/gems/2.3.0/gems/google-api-client-0.9.20/lib/google/apis/core/api_command.rb:102:in `check_status'
from /var/lib/gems/2.3.0/gems/google-api-client-0.9.20/lib/google/apis/core/download.rb:94:in `execute_once'
from /var/lib/gems/2.3.0/gems/google-api-client-0.9.20/lib/google/apis/core/http_command.rb:107:in `block (2 levels) in execute'
from /var/lib/gems/2.3.0/gems/retriable-2.1.0/lib/retriable.rb:54:in `block in retriable'
from /var/lib/gems/2.3.0/gems/retriable-2.1.0/lib/retriable.rb:48:in `times'
from /var/lib/gems/2.3.0/gems/retriable-2.1.0/lib/retriable.rb:48:in `retriable'
from /var/lib/gems/2.3.0/gems/google-api-client-0.9.20/lib/google/apis/core/http_command.rb:104:in `block in execute'
from /var/lib/gems/2.3.0/gems/retriable-2.1.0/lib/retriable.rb:54:in `block in retriable'
from /var/lib/gems/2.3.0/gems/retriable-2.1.0/lib/retriable.rb:48:in `times'
from /var/lib/gems/2.3.0/gems/retriable-2.1.0/lib/retriable.rb:48:in `retriable'
from /var/lib/gems/2.3.0/gems/google-api-client-0.9.20/lib/google/apis/core/http_command.rb:96:in `execute'
from /var/lib/gems/2.3.0/gems/google-api-client-0.9.20/lib/google/apis/core/base_service.rb:351:in `execute_or_queue_command'
from /var/lib/gems/2.3.0/gems/google-api-client-0.9.20/generated/google/apis/drive_v3/service.rb:772:in `get_file'
from /home/fabian/Desktop/programs/drivesync-master/src/drive_manager.rb:92:in `download'
from /home/fabian/Desktop/programs/drivesync-master/src/synchronizer.rb:132:in `download_file'
from /home/fabian/Desktop/programs/drivesync-master/src/synchronizer.rb:251:in `block in sync'
from /home/fabian/Desktop/programs/drivesync-master/src/synchronizer.rb:248:in `each'
from /home/fabian/Desktop/programs/drivesync-master/src/synchronizer.rb:248:in `sync'
from /home/fabian/Desktop/programs/drivesync-master/src/synchronizer.rb:76:in `run'
from /home/fabian/Desktop/programs/drivesync-master/drivesync.rb:23:in `sync'
from /home/fabian/Desktop/programs/drivesync-master/drivesync.rb:58:in `<main>'
When I then try to start the program again, it starts deleting files remotely, because it thinks that the local folder is correct.
Authenticated fine, but no files are syncing. Just happily sits there doing nothing... no output, no files. Exits gracefully on ctrl-c.
Hello,
authorization URL printed in the terminal leads to an error 400: invalid request, which is shown by a Google OAuth login site:
The out-of-band (OOB) flow has been blocked in order to keep users secure. Follow the Out-of-Band (OOB) flow migration guide linked in the developer docs below to migrate your app to an alternative method.
Request details: redirect_uri=urn:ietf:wg:oauth:2.0:oob
As far as I can read here and here, authentication method used by drivesync
is deprecated now.
Hello, does anyone know how to fix this issue?, thanks in advance
cesar@cesar-HP-Compaq-Pro-6300-SFF:~/drivesync$ ruby drivesync.rb
Local folder is 168 files behind and 73 files ahead of remote
Traceback (most recent call last):
5: from drivesync.rb:64:in <main>' 4: from drivesync.rb:23:in
sync'
3: from /home/cesar/drivesync/src/synchronizer.rb:68:in run' 2: from /home/cesar/drivesync/src/synchronizer.rb:224:in
load_manifest'
1: from /usr/lib/ruby/2.5.0/json/common.rb:156:in parse' /usr/lib/ruby/2.5.0/json/common.rb:156:in
parse': 765: unexpected token at '' (JSON::ParserError)
I'm running from the bundled package. When I first manually ran the program it did sync some files to my local directory, then appeared to stop after a few minutes. I ran it manually again and got the following output:
$ ./drivesync
Local folder is 1576 files behind and 0 files ahead of remote
Starting sync at 2017-12-04 18:51:39 -0600
/home/thomas/Downloads/drivesync-linux-x86_64-v_1.2/lib/app/src/synchronizer.rb:127:in 'block in sync': undefined method '[]' for nil:NilClass (NoMethodError)
from /home/thomas/Downloads/drivesync-linux-x86_64-v_1.2/lib/app/src/synchronizer.rb:124:in 'each'
from /home/thomas/Downloads/drivesync-linux-x86_64-v_1.2/lib/app/src/synchronizer.rb:124:in 'sync'
from /home/thomas/Downloads/drivesync-linux-x86_64-v_1.2/lib/app/src/synchronizer.rb:228:in 'run'
from /home/thomas/Downloads/drivesync-linux-x86_64-v_1.2/lib/app/drivesync.rb:4:in '<main>'
This has been working flawlessly for months (thank you). Did Google change their API or something?
Uploading file Classroom/Physical Science 10 Spring 2023/notes/7D Periodic Trends.pdf ...
/home/xxx/software/drivesync/src/drive_manager.rb:158:in `block in folder_with_name': undefined method `first' for nil:NilClass (NoMethodError)
from /home/xxx/software/drivesync/src/drive_manager.rb:158:in `select'
from /home/xxx/software/drivesync/src/drive_manager.rb:158:in `folder_with_name'
from /home/xxx/software/drivesync/src/drive_manager.rb:180:in `block in traverse_and_create'
from /home/xxx/software/drivesync/src/drive_manager.rb:178:in `each'
from /home/xxx/software/drivesync/src/drive_manager.rb:178:in `traverse_and_create'
from /home/xxx/software/drivesync/src/drive_manager.rb:108:in `upload'
from /home/xxx/software/drivesync/src/synchronizer.rb:166:in `upload_file'
from /home/xxx/software/drivesync/src/synchronizer.rb:282:in `block in sync'
from /home/xxx/software/drivesync/src/synchronizer.rb:279:in `each'
from /home/xxx/software/drivesync/src/synchronizer.rb:279:in `sync'
from /home/xxx/software/drivesync/src/synchronizer.rb:71:in `run'
from drivesync.rb:23:in `sync'
from drivesync.rb:64:in `<main>'
If google drive has additional shared drives his not synced.
Synced only files in MyDrive folder.
cat config.yml | grep sync_shared_in_drive
sync_shared_in_drive: true
Hello!
If datasync interrupted before first sync is finished (with ctrl+c) next start will start delete files remotely (from google drive).
Hi, I'm using drivesync to upload (~750000) file to my google drive, but every hundreds file the app stops with an error.
each file is about 160 KB only, my google drive have a large empty space more than what I need.
I'm using Ubuntu 20.04.02
Uploading file project/cropped_nodules/358094.npy ...
Traceback (most recent call last):
23: from drivesync.rb:64:in<main>' 22: from drivesync.rb:23:in
sync'
21: from /home/mustafa/drivesync/src/synchronizer.rb:71:inrun' 20: from /home/mustafa/drivesync/src/synchronizer.rb:279:in
sync'
19: from /home/mustafa/drivesync/src/synchronizer.rb:279:ineach' 18: from /home/mustafa/drivesync/src/synchronizer.rb:282:in
block in sync'
17: from /home/mustafa/drivesync/src/synchronizer.rb:166:inupload_file' 16: from /home/mustafa/drivesync/src/drive_manager.rb:116:in
upload'
15: from /var/lib/gems/2.5.0/gems/google-api-client-0.23.4/generated/google/apis/drive_v3/service.rb:601:increate_file' 14: from /var/lib/gems/2.5.0/gems/google-api-client-0.23.4/lib/google/apis/core/base_service.rb:360:in
execute_or_queue_command'
13: from /var/lib/gems/2.5.0/gems/google-api-client-0.23.4/lib/google/apis/core/http_command.rb:93:inexecute' 12: from /var/lib/gems/2.5.0/gems/retriable-3.1.2/lib/retriable.rb:56:in
retriable'
11: from /var/lib/gems/2.5.0/gems/retriable-3.1.2/lib/retriable.rb:56:intimes' 10: from /var/lib/gems/2.5.0/gems/retriable-3.1.2/lib/retriable.rb:61:in
block in retriable'
9: from /var/lib/gems/2.5.0/gems/google-api-client-0.23.4/lib/google/apis/core/http_command.rb:101:inblock in execute' 8: from /var/lib/gems/2.5.0/gems/retriable-3.1.2/lib/retriable.rb:56:in
retriable'
7: from /var/lib/gems/2.5.0/gems/retriable-3.1.2/lib/retriable.rb:56:intimes' 6: from /var/lib/gems/2.5.0/gems/retriable-3.1.2/lib/retriable.rb:61:in
block in retriable'
5: from /var/lib/gems/2.5.0/gems/google-api-client-0.23.4/lib/google/apis/core/http_command.rb:104:inblock (2 levels) in execute' 4: from /var/lib/gems/2.5.0/gems/google-api-client-0.23.4/lib/google/apis/core/upload.rb:246:in
execute_once'
3: from /var/lib/gems/2.5.0/gems/google-api-client-0.23.4/lib/google/apis/core/upload.rb:170:inprocess_response' 2: from /var/lib/gems/2.5.0/gems/google-api-client-0.23.4/lib/google/apis/core/http_command.rb:183:in
process_response'
1: from /var/lib/gems/2.5.0/gems/google-api-client-0.23.4/lib/google/apis/core/api_command.rb:118:incheck_status' /var/lib/gems/2.5.0/gems/google-api-client-0.23.4/lib/google/apis/core/http_command.rb:221:in
check_status': Server error (Google::Apis::ServerError)
What is the correct structure for enforcing Whitelist/Blacklist ? I tried Blacklist["/FolderA", "/FolderB"]
, if Folder A and Folder B are in the root directory of my drive ?
And also how do we exclude/include folders in Computers
in the left section ?
In the src, it looks like I can easily change the credentials file and the configuration folder. Can I also change the name of drivesync in the src, and then create two applications, (1) drivesync (for the original Google account) and (2) Xdrivesync (for the second Google account)? Or do I not even need to change the name, but instead just run the program from within two different folders?
I am NOT a programmer, so I may completely misunderstand what is going on!
This script is not syncing files owner by others in a shared folder.
Is possible?
Is an issue on my side?
By default, when deleting files, DriveSync should put them in google drive recycle bin and have an option to bypass this (--no-bin)
I accidentally did a reset thinking that all my configs would be reset only. Why does the default behavior delete local files? Why the destructive approach here? (I was lucky that I did not have a lot of important stuff but this is so problematic for most I would assume)!
I'm trying to run ruby drivesync.rb but comes ERROR : Could not write lock file!
I have tried search on Google what's causing this problem but didn't found the solution
I don't know this is drivesync related or terminal related
I'm using termux on Android
First off, thanks for all the hard work on this project, I am really loving it.
If I create a new folder with no content (either locally or via the Drive web client) the folder is not synchronized. Once I ad a file to the folder, it will synchronize. Additionally, deleting a folder (either from the cloud or from the local client) doesn't synchronize. The contents will be deleted, but the folder structure will remain.
I am running 1.3.3 on Debian 9.4 and ruby 2.3.3p222 (2016-11-21) [x86_64-linux-gnu]
Any thoughts on what can be done to allow these changes to synchronize?
Thanks!
When I run ruby drivesync.rb
, the console will hang for about 5 minutes before outputting the "Sync complete." message, even if everything is already synced. Is this normal?
Here's an example, I first print the time to show you how long the sync takes:
$ date "+%H:%M:%S"; ruby drivesync.rb
17:39:34
Local folder is 0 files behind and 0 files ahead of remote
Starting sync at 2019-09-13 17:44:19 -0400Sync complete.
I've only used less than 50MB of the drive space.
I've the following symlinked directory:
[munif:~/data/Drive] $ ls -l
lrwxrwxrwx 1 munif munif 33 Oct 26 14:03 documents -> /home/ubuntu/munif/data/documents
/home/ubuntu/munif/data/documents
directory has many files and folders inside it.
I created an empty folder named documents
on my Google Drive.
When I run drivesync
, nothing happens.
Dropbox's Linux client follows symlinks. It'd be nice to have this feature in DriveSync.
Google replies that logging in is temporary disabled, because the app is not verified.
I run drivesync in a official ruby:2.6.6 docker container, see dockerfile
During downloading files from google drive to my local host, drivesync sometimes fail while processing a file with a special character, see two examples below:
file name: Bokningsbekräftelse/Kvitto.pdf
special character: ä UTF-8: \xc3\xa4
Updating file Aimer39V1.0.0.pdf ...
Uploading file Bokningsbekräftelse/Kvitto.pdf ...
Traceback (most recent call last):
21: from drivesync.rb:64:in `<main>'
20: from drivesync.rb:23:in `sync'
19: from /drivesync/src/synchronizer.rb:71:in `run'
18: from /drivesync/src/synchronizer.rb:279:in `sync'
17: from /drivesync/src/synchronizer.rb:279:in `each'
16: from /drivesync/src/synchronizer.rb:282:in `block in sync'
15: from /drivesync/src/synchronizer.rb:166:in `upload_file'
14: from /drivesync/src/drive_manager.rb:108:in `upload'
13: from /drivesync/src/drive_manager.rb:178:in `traverse_and_create'
12: from /drivesync/src/drive_manager.rb:178:in `each'
11: from /drivesync/src/drive_manager.rb:181:in `block in traverse_and_create'
10: from /drivesync/src/drive_manager.rb:167:in `create_folder'
9: from /usr/local/bundle/gems/google-api-client-0.23.4/generated/google/apis/drive_v3/service.rb:601:in `create_file'
8: from /usr/local/bundle/gems/google-api-client-0.23.4/lib/google/apis/core/base_service.rb:360:in `execute_or_queue_command'
7: from /usr/local/bundle/gems/google-api-client-0.23.4/lib/google/apis/core/http_command.rb:91:in `execute'
6: from /usr/local/bundle/gems/google-api-client-0.23.4/lib/google/apis/core/api_command.rb:64:in `prepare!'
5: from /usr/local/bundle/gems/representable-3.0.4/lib/representable/json.rb:44:in `to_json'
4: from /usr/local/bundle/gems/multi_json-1.13.1/lib/multi_json.rb:139:in `dump'
3: from /usr/local/bundle/gems/multi_json-1.13.1/lib/multi_json/adapter.rb:25:in `dump'
2: from /usr/local/bundle/gems/multi_json-1.13.1/lib/multi_json/adapters/json_common.rb:19:in `dump'
1: from /usr/local/bundle/gems/multi_json-1.13.1/lib/multi_json/adapters/json_common.rb:19:in `to_json'
/usr/local/bundle/gems/multi_json-1.13.1/lib/multi_json/adapters/json_common.rb:19:in `encode': "\xC3" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError)
file name: 1980 12 Sacré Coeur 5.jpg
special character: é UTF-8: \xc3\xa8
Updating file Google Foto's/2008/01/1977 7 12half jaar.jpg ...
Downloading file Google Foto's/2008/01/1977 8 12half jaar.jpg ...
Uploading file Google Foto's/2008/01/1980 12 Sacré Coeur 5.jpg ...
Traceback (most recent call last):
19: from drivesync.rb:64:in `<main>'
18: from drivesync.rb:23:in `sync'
17: from /drivesync/src/synchronizer.rb:71:in `run'
16: from /drivesync/src/synchronizer.rb:279:in `sync'
15: from /drivesync/src/synchronizer.rb:279:in `each'
14: from /drivesync/src/synchronizer.rb:282:in `block in sync'
13: from /drivesync/src/synchronizer.rb:166:in `upload_file'
12: from /drivesync/src/drive_manager.rb:116:in `upload'
11: from /usr/local/bundle/gems/google-api-client-0.23.4/generated/google/apis/drive_v3/service.rb:601:in `create_file'
10: from /usr/local/bundle/gems/google-api-client-0.23.4/lib/google/apis/core/base_service.rb:360:in `execute_or_queue_command'
9: from /usr/local/bundle/gems/google-api-client-0.23.4/lib/google/apis/core/http_command.rb:91:in `execute'
8: from /usr/local/bundle/gems/google-api-client-0.23.4/lib/google/apis/core/upload.rb:141:in `prepare!'
7: from /usr/local/bundle/gems/google-api-client-0.23.4/lib/google/apis/core/upload.rb:51:in `prepare!'
6: from /usr/local/bundle/gems/google-api-client-0.23.4/lib/google/apis/core/api_command.rb:64:in `prepare!'
5: from /usr/local/bundle/gems/representable-3.0.4/lib/representable/json.rb:44:in `to_json'
4: from /usr/local/bundle/gems/multi_json-1.13.1/lib/multi_json.rb:139:in `dump'
3: from /usr/local/bundle/gems/multi_json-1.13.1/lib/multi_json/adapter.rb:25:in `dump'
2: from /usr/local/bundle/gems/multi_json-1.13.1/lib/multi_json/adapters/json_common.rb:19:in `dump'
1: from /usr/local/bundle/gems/multi_json-1.13.1/lib/multi_json/adapters/json_common.rb:19:in `to_json'
/usr/local/bundle/gems/multi_json-1.13.1/lib/multi_json/adapters/json_common.rb:19:in `encode': "\xC3" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError)
To resolve this (each time a file name contains a special character) I need to:
I think my docker container supports UTF-8, because I am able to rename the files from inside the container:
[root@i7nuc Docker-Linux-sync-Google-Drive]# podman run -it \
-v /mnt/extdisk/googledrive:/root/Documents/drive:z localhost/google-drivesync /bin/bash
root@12303cbbee3c:/drivesync# mv "/root/Documents/drive/Google Foto's/2008/01/1980 12 Sacré Coeur 5.jpg" "/root/Documents/drive/Google Foto's/2008/01/1980 12 Sacre Coeur 5.jpg"
root@12303cbbee3c:/drivesync# ls -l "/root/Documents/drive/Google Foto's/2008/01/1980 12 Sacre Coeur 5.jpg"
-rw-r--r--. 1 root root 801428 May 27 12:24 "/root/Documents/drive/Google Foto's/2008/01/1980 12 Sacre Coeur 5.jpg"
My locale setting inside the container:
root@12303cbbee3c:/drivesync# locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
What can I do to resolve this? (I have no experience with Ruby).
I had to setup my system new, installed git
(Ruby was already installed) and did git clone [email protected]:MStadlmeier/drivesync.git
. The result was:
The authenticity of host 'github.com (192.30.253.112)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? y
Please type 'yes' or 'no': yes
Warning: Permanently added 'github.com,192.30.253.112' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.```
I'm just getting started with DriveSync -- I noticed that it doesn't sync things which have been shared with me that I've added to My Drive:
drivesync/src/drive_manager.rb
Lines 70 to 71 in 1f82759
Hi,
I use drivesync on two different machines, both running Archlinux, and recently they both got this error when launching ruby drivesync.rb (both used to work perfectly fine before) :
ruby drivesync/drivesync.rb ✔ 14:46:34
internal:/usr/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb:85:in require': cannot load such file -- google/apis/drive_v3 (LoadError) from <internal:/usr/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in
require'
from /home/tromzy/drivesync/src/synchronizer.rb:1:in <top (required)>' from drivesync/drivesync.rb:1:in
require_relative'
from drivesync/drivesync.rb:1:in `
What should I do ?
I have a directory /foo
that I want drivesync to mostly ignore, but there are some subfolders /foo/bar
and /foo/baz
I want to still be included.
From the readme, it seems like there's no way to do this currently. If that's the case, I think it would be very helpful to add some way of doing this.
i do the first few steps(install ruby, git clone the repo)
and then when i run " bundle install "
it throws this error " google-api-client-0.23.4 requires ruby version ~> 2.0, which is incompatible with the
current version, ruby 3.0.2p107
"
/usr/local/rvm/gems/ruby-2.6.3/gems/signet-0.8.1/lib/signet/oauth_2/client.rb:988:in `fetch_access_token': Authorization failed. Server message: (Signet::AuthorizationError)
{
"error": "invalid_grant",
"error_description": "Token has been expired or revoked."
}
Installed drivesync on osx, after installing Ruby 2.6.x using homebrew. I understand that I need to create the config.yml file by running drivesync.rb, but when I do, I get the following. Any possible guidance? Thanks!
ruby drivesync.rb
Traceback (most recent call last):
4: from drivesync.rb:1:in `<main>'
3: from drivesync.rb:1:in `require_relative'
2: from /Users/sstromer/Applications/GitHub/drivesync/src/synchronizer.rb:1:in `<top (required)>'
1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- google/apis/drive_v3 (LoadError)
I saw that the script doesn't sync anymore files. I noticed that it keep running background using a lot of CPU (around 50-100% of my raspberry) then it stops after 1 minute (some times 3-4 minutes) without give any error or printing some info about sync. I thought the authorization was broken and it keep retrying to connect to the google's api.
I removed the ~/.credentials/drivesync.yaml and created a new authorization token, but now I got this error:
/var/lib/gems/2.3.0/gems/google-api-client-0.23.4/lib/google/apis/core/http_command.rb:218:in `check_status': notFound: File not found: 1QyyQUEJnFpY9dUUnCENSORED. (Google::Apis::ClientError)
from /var/lib/gems/2.3.0/gems/google-api-client-0.23.4/lib/google/apis/core/api_command.rb:116:in `check_status'
from /var/lib/gems/2.3.0/gems/google-api-client-0.23.4/lib/google/apis/core/http_command.rb:183:in `process_response'
from /var/lib/gems/2.3.0/gems/google-api-client-0.23.4/lib/google/apis/core/http_command.rb:299:in `execute_once'
from /var/lib/gems/2.3.0/gems/google-api-client-0.23.4/lib/google/apis/core/http_command.rb:104:in `block (2 levels) in execute'
from /var/lib/gems/2.3.0/gems/retriable-3.1.2/lib/retriable.rb:61:in `block in retriable'
from /var/lib/gems/2.3.0/gems/retriable-3.1.2/lib/retriable.rb:56:in `times'
from /var/lib/gems/2.3.0/gems/retriable-3.1.2/lib/retriable.rb:56:in `retriable'
from /var/lib/gems/2.3.0/gems/google-api-client-0.23.4/lib/google/apis/core/http_command.rb:101:in `block in execute'
from /var/lib/gems/2.3.0/gems/retriable-3.1.2/lib/retriable.rb:61:in `block in retriable'
from /var/lib/gems/2.3.0/gems/retriable-3.1.2/lib/retriable.rb:56:in `times'
from /var/lib/gems/2.3.0/gems/retriable-3.1.2/lib/retriable.rb:56:in `retriable'
from /var/lib/gems/2.3.0/gems/google-api-client-0.23.4/lib/google/apis/core/http_command.rb:93:in `execute'
from /var/lib/gems/2.3.0/gems/google-api-client-0.23.4/lib/google/apis/core/base_service.rb:360:in `execute_or_queue_command'
from /var/lib/gems/2.3.0/gems/google-api-client-0.23.4/generated/google/apis/drive_v3/service.rb:792:in `get_file'
from /opt/drivesync/src/drive_manager.rb:152:in `get_folder'
from /opt/drivesync/src/drive_manager.rb:142:in `resolve_path'
from /opt/drivesync/src/drive_manager.rb:87:in `block in get_files'
from /opt/drivesync/src/drive_manager.rb:87:in `each'
from /opt/drivesync/src/drive_manager.rb:87:in `get_files'
from /opt/drivesync/src/synchronizer.rb:85:in `get_files'
from /opt/drivesync/src/synchronizer.rb:66:in `run'
from /opt/drivesync/drivesync.rb:23:in `sync'
from /opt/drivesync/drivesync.rb:64:in `<main>'
Is this a problem of google's api?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.