Hi.
So, I’m downloading 8 TB’s onto my USB HDD via oDrive on Windows.
I want to download the linux CLI, mount the USB to a folder, and basically continue the odrive sync from where it left off with Windows.
E.G. mount onto the USB folder, re-sync, leaving the existing content there and downloading things that hasn’t synced.
“$HOME/.odrive-agent/bin/odrive” mount “/shared/odrive” /
Like this?
python “$HOME/.odrive-agent/bin/odrive.py” sync “shared/odrive/Google Drive.cloudf” —recursive
(FYI, my storage cloudf is already synced so I am not even sure if it’ll be there as “.cloudf”?)
I am ever so nervous of messing up what I’ve already downloaded - it’ll take about 1 month to download the rest.
This sounds like the correct pathing based on what you’ve described above. odrive will perform a merge of the two folders and determine what is already synced locally.
To confirm the approach and behavior and make sure it is what you want and expect, you can start by mounting a subfolder and observing the result. For example: "$HOME/.odrive-agent/bin/odrive" mount "/shared/odrive/Google Drive/subfolder1/subfolder2" "/Google Drive/subfolder1/subfolder2"
What you should see is that odrive will:
Scan through the items on both the local and remote sides and determine what is already the same on both sides.
If odrive sees anything locally that is not on the remote, or is different than the remote (a file has a different size locally, for example), it will upload it.
Anything on the remote side that is not on the local side will show up as a new placeholder file.
Anything on the remote side that already has a corresponding placeholder file on the local side will remain that way.
Once odrive is done scanning through, you can start a recursive sync: python "$HOME/.odrive-agent/bin/odrive.py" sync "/shared/odrive/Google Drive/subfolder1/subfolder2" --recursive and odrive will download all of the remaining items.
Once done with the test, you can unmount "/shared/odrive/Google Drive/subfolder1/subfolder2" and go for the full mount and sync:
"$HOME/.odrive-agent/bin/odrive" mount "/shared/odrive" "/"
The scan that is kicked off on the full mount will likely take a long time to complete since odrive will need to go through every folder and look at the local and remote listings and do a comparison. Once done, you can kick off the recursive sync.
For the recursive sync, since you have so much data, you can also use a more advanced command to increase performance by using 4 concurrent processes (the CLI --recursive is single-threaded): exec 6>&1;num_procs=4;output="go"; while [ "$output" ]; do output=$(find "/shared/odrive" -name "*.cloud*" -print0 | xargs -0 -n 1 -P $num_procs "$HOME/.odrive-agent/bin/odrive" sync | tee /dev/fd/6); done
“$HOME/.odrive-agent/bin/odrive” mount “/shared/odrive/Google\ Drive/asus” “/Google Drive/asus”
Unable to sync /shared/odrive/Google\ Drive/asus Path not found.
On another computer I did sync (freshly)
With something like this:
“$HOME/.odrive-agent/bin/odrive” refresh ~/odrive-agent-mount/Google\ Drive/Personal/TV\ Shows/
I’ve done:
cd /shared/odrive
Then executed:
“$HOME/.odrive-agent/bin/odrive” mount “/shared/odrive” /
I am not actually sure what it is syncing, if it’s going to do all my storage inside /odrive/ or just the Google Drive one that is already started from Windows?
odrive Make Cloud Storage THE WAY IT SHOULD BE.
isActivated: True hasSession: True
email: XX@XX.co.uk accountType: OneDrive
syncEnabled: True version: prod 999
placeholderThreshold: neverDownload autoUnsyncThreshold: never
downloadThrottlingThreshold: unlimited uploadThrottlingThreshold: normal
autoTrashThreshold: never Mounts: 1
xlThreshold: never Backups: 0
I believe you were getting this error because you quoted the path but still had the \ to escape the space between Google and Drive. When you use quotes you don’t need to use the \ escape character for spaces.
This will mount your entire remote odrive to /shared/odrive. The background request shown is likely the scan of all of the exposed folders.
This will kick off a recursive download of Google Drive folder. There shouldn’t be any data loss. Are you seeing something unexpected?
While I can see /asus/test in that screenshot, the file is basically empty and it hasn’t downloaded the actual file.
Do I need to wait a long time until I find out it completes it?
It will depend on the amount of data odrive needs to go through. Since you started at the top of the Google Drive folder it may be traversing through other folders first and hasn’t gotten to asus/test yet.
You can tail the sync log with tail -F ~/.odrive-agent/log/main.log to see the current activity.
root@nextcloud ~# tail -F ~/.odrive-agent/log/main.log
05 Dec 05:55:00PM INFO Successful Expand Folder for /shared/odrive/Google Drive/MacriumAsus.cloudf
05 Dec 05:55:01PM INFO Successful Expand Folder for /shared/odrive/Google Drive/Uber.cloudf
05 Dec 05:55:02PM INFO Successful Expand Folder for /shared/odrive/Google Drive/Fitbit.cloudf
05 Dec 05:55:08PM INFO Successful Expand Folder for /shared/odrive/Google Drive/QuickBooks.cloudf
05 Dec 05:55:12PM INFO Successful Expand Folder for /shared/odrive/Google Drive/asus.cloudf
05 Dec 05:55:13PM INFO Successful Expand Folder for /shared/odrive/Google Drive/LAPTOP-External-Syncs.cloudf
05 Dec 05:55:15PM INFO Successful Expand Folder for /shared/odrive/Google Drive/IFTTT.cloudf
05 Dec 05:55:28PM INFO Successful Expand Folder for /shared/odrive/Google Drive/support@profanity-blocker.com.cloudf
05 Dec 05:55:52PM INFO Successful Expand Folder for /shared/odrive/Google Drive/Shared with Me.cloudf
05 Dec 06:01:28PM ERROR Failed Upload File for /shared/odrive/Google Drive/netsh advfirewall firewall add rule name="Allow from 192.gdocx Error: Gdocs cannot be uploaded.
I think it’ll be a while until I know if it will download the files. Nothing meaningful in the logs.
The bit I am curious about is when it did this:
05 Dec 05:55:12PM INFO Successful Expand Folder for /shared/odrive/Google Drive/asus.cloudf
Hi @voarsh,
Sync traversal isn’t necessarily linear, so it may be operating on some other paths.
You can use this command to get a good idea of the current activity: watch -n 5 'date && ~/.odrive-agent/bin/odrive status --sync_requests && ~/.odrive-agent/bin/odrive status --downloads && ~/.odrive-agent/bin/odrive status --uploads && ~/.odrive-agent/bin/odrive status --background && tail ~/.odrive-agent/log/main.log'
Is the recursive sync command still running or did it return? It is also possible that the sync command was issued too early and odrive wasn’t finished scanning.
I can’t actually say at the moment, I closed the screen for that.
But I guess so:
Sync Requests: 1
Background Requests: 1
Uploads: 0
Downloads: 0
Trash: 0
Waiting: 0
Not Allowed: 1
Should I kill odrive and start it again?
I keep seeing new .cloudf files but no new files that it actually downloads.
watch -n 5 'date && ~/.odrive-agent/bin/odrive status --sync_requests && ~/.odrive-agent/bin/odrive status --downloads && ~/.odrive-agent/bin/odrive status --uploads && ~/.odrive-agent/bin/odrive status --background && tail ~/.odrive-agent/log/main.log'
Every 5.0s: date && ~/.odrive-agent/bin/odrive status --sync_requests && ~/.odrive-agent/bin/odrive status --downloads && ~/.odr… nextcloud: Sat Dec 5 18:23:19 2020
Sat Dec 5 18:23:19 UTC 2020
/shared/odrive/Google Drive/Shared with Me 0%
No downloads.
No uploads.
Google Drive 0%
05 Dec 05:55:02PM INFO Successful Expand Folder for /shared/odrive/Google Drive/Fitbit.cloudf
05 Dec 05:55:08PM INFO Successful Expand Folder for /shared/odrive/Google Drive/QuickBooks.cloudf
05 Dec 05:55:12PM INFO Successful Expand Folder for /shared/odrive/Google Drive/asus.cloudf
05 Dec 05:55:13PM INFO Successful Expand Folder for /shared/odrive/Google Drive/LAPTOP-External-Syncs.cloudf
05 Dec 05:55:15PM INFO Successful Expand Folder for /shared/odrive/Google Drive/IFTTT.cloudf
05 Dec 05:55:28PM INFO Successful Expand Folder for /shared/odrive/Google Drive/support@profanity-blocker.com.cloudf
05 Dec 05:55:52PM INFO Successful Expand Folder for /shared/odrive/Google Drive/Shared with Me.cloudf
05 Dec 06:01:28PM ERROR Failed Upload File for /shared/odrive/Google Drive/netsh advfirewall firewall add rule name= Allow from 192.gdocx Error: Gdocs cannot be u
ploaded.
05 Dec 06:15:34PM ERROR Failed Upload File for /shared/odrive/Google Drive/netsh advfirewall firewall add rule name= Allow from 192.gdocx Error: Gdocs cannot be u
ploaded.
05 Dec 06:21:34PM ERROR Failed Upload File for /shared/odrive/Google Drive/netsh advfirewall firewall add rule name= Allow from 192.gdocx Error: Gdocs cannot be u
ploaded.
Ahh, okay, then it should be alright. The status output shows it is working on Google Drive as a background request and is actively syncing /shared/odrive/Google Drive/Shared with Me (doing folder expands). It is probably just going to take a long time to get through everything.
I would actually suggest not running it in the background. Instead I would open up some additional putty sessions to the server so you can monitor progress and behavior. In the background you lose some visibility.
I suggest:
1 window for the status/logging monitor command
1 window for the recursive sync command (either the --recursive or the scripted one above)
1 window for misc stuff you may need to do on the server while things are running
This is a scripted way to perform a multi-threaded recursive sync. It basically will do the same thing as --recursive, except it will do it in 4 concurrent threads (so 4x).