How i can copy file on drive without download - upload

Hi bros,
I have 2 drives, 1 drive with lot of large files what I want to create backup in other drive, and more in the future
I found something like that from here and here but its not working with my tool, an automate tool (my tool can call a commandline like rclone)
I dont know maybe rclone have a command what support to copy a file (on google drive) to my drive?
I am sorry if you can't understand because my English is very bad
Thank you for read my question
P/s: I am using rclone version 1.48.0 windows - I am using Windows 10 (x64)

yes. rclone has this feature.
set this in your configuration file (under drive remote):
server_side_across_configs = true

then you can do server-side move and copy (with normal rclone copy and rclone move commands). copying will count against quota, and server-side copying quota seems to be less than general upload. Moving should not (because it only really changes the permissions).

Server-side copying quotas are not well documented and google won't say. Some say 100GB/day, but my experience is more like 200-300GB/day. More research is needed :slight_smile:

2 Likes

I verified that rclone does not do the permission change as of yet.

1 Like

Thank you for your answer bro
Is copy instant?
I mean, when I using copy api of google, a 5GB file copied instant, just like i using "Make a copy" function in drive or it need time for transfer?
Thank you and thank @DarKSkuLL too

When I do server-side copies it registers as like several GB/sec typically - so it may not be instant, but it it's so fast it's effectively the same. The main delay really becomes the latency in requests and the limits on how many files you can change at a time (about 2/sec).

That's why I'm not really sure if these are true copies or just some sort of adding a pointer to a new place that happens in the back-end. Even for google this is pretty damn fast. I can't imagine all this Gdrive data is on SSD space

ok, interresting. I haven't done any practical test.
Did you do a practical test and conclude it does count against quota? (if so, what quota do you think?)
Or did you check the code to see what method is used?

I'm still not quite clear what the underlying mechanism for this feature is - ie. if there exists actual server-side copy support (between drives) in the API or if this is some workaround that leverages file-sharing functionality or something like that. Would be nice to know more about it.

Yeah, I tried moving files between drives which are in the same domain,
the files were moved at very high speeds (server side), but the owner of the files remained unchanged.

if ower not change its just like click "Add to my drive"
If you click "Make a copy" It change to your owner

@thestigma: I think so that simple is a "shortcut" to original file, but if I remove in 1st drive, it is not deleted from 2nd drive if you change its owner. I think they will remove file on server only when file is not in all of drive

I still not try to do your example because i still not understand how to config server_side_across_configs = true

Yes, when you use the GDrive Web UI to "make a copy" it does make a copy in your drive.

I think its like this,
all that you see in the GDrive UI is metadata for the file which is stored somewere in google's servers.
There are many flags in the metadata,
one such flag is isTrashed (bool), when you delete a file, google just sets the flag to true.
When you empty trash it deletes all files with isTranshed (bool).

A google remote looks like this in your config:

[of2_play]
type = drive
client_id = 75956856XXXXXXXhnuq3eneg2qllv.apps.googleusercontent.com
client_secret = Om7IXXXXXXXKA4__7X
root_folder_id = 1-F6a9XXXXXX24Ek7IrugA_RS
scope = drive
chunk_size = 8M
upload_cutoff = 1k
token = {"access_token":"ya29.GlxpB5XXXXXXXXXXXXXXXXXXXX7C7ISw_4RdxJDoXKy7EDZTh-09zSbNS7WMw2ODh8g","token_type":"Bearer","refresh_token":"1/6OEfXXXXXXXXXXXXXXmUWRwYTQ","expiry":"2019-08-19T20:57:39.3983153+05:30"}

all you need to do is add a new line with
server_side_across_configs = true
so now the config looks like this:

[of2_play]
type = drive
client_id = 75956856XXXXXXXhnuq3eneg2qllv.apps.googleusercontent.com
client_secret = Om7IXXXXXXXKA4__7X
root_folder_id = 1-F6a9XXXXXX24Ek7IrugA_RS
scope = drive
server_side_across_configs = true
chunk_size = 8M
upload_cutoff = 1k
token = {"access_token":"ya29.GlxpB5XXXXXXXXXXXXXXXXXXXX7C7ISw_4RdxJDoXKy7EDZTh-09zSbNS7WMw2ODh8g","token_type":"Bearer","refresh_token":"1/6OEfXXXXXXXXXXXXXXmUWRwYTQ","expiry":"2019-08-19T20:57:39.3983153+05:30"}

Thank you bro, i will try

Just to avoid confusion - you will have to add this directly to your config file (open it with any text editor).
I'm not sure if this setting is an option through the "rclone config" tool that you probably used to set up the remote to begin with.

If you are uncertain of where your config file is located - run rclone config and it will tell you at the very start.

Its work perfectly as i need
Thank you and everyone who read and reply in this topic

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.