Easy way to copy gdrive trash contents to local folder on Ubuntu 18?

What is the problem you are having with rclone? Cannot figure out how to access and copy files from gdrive trash via Rclone.

What is your rclone version (output from rclone version)v1.36

Which OS you are using and how many bits (eg Windows 7, 64 bit) Ubuntu server 18.04.3 LTS

Which cloud storage system are you using? (eg Google Drive)option # 7 gdrive and i have a paid Google 1 account.

The command you were trying to run (eg rclone copy /tmp remote:tmp) rclone ls gdrive:/.trash

A log from the command with the -vv flag (eg output from rclone -vv copy /tmp remote:tmp)

Trashed files on Gdrive are technically still there in the same location - they are just flagged as trash to be cleaned up after a month.

Normally a Gdrive remote just ignores all trash and only shows normal files.

If you use the flag --drive-trashed-only (put this in the rclone commandline) then it will reverse this. Showing only trash and no regular files. You can therefore create a second remote that is effectively your trashbin. Files in there will otherwise work normally, so feel free to copy them anywhere you want. Note that Gdrive removes trash after 30 days by default, so obviously don't put stuff in there you want to keep.

Just be careful about using the "purge" command on fodlers in trash. I know there was a bug back a while where this could end up afecting non-deleted files too since they are technically both in the same folder. purge is not the same as deleting - and if you don't know what "purge" is (which is likely) then you don't need to worry about it because it's a spesific command you have to write in commandline and you won't be doing it accidentally. The bug has probably have been fixed by now, but im not 100% sure on that, so just thought I'd mention it.

If you'd rather put it permanently into the remote config file rather than in the rclone command you can do this too (as with all remote-spesific flags). then it will be this format:
trashed_only = true

Link to the documentation:
https://rclone.org/drive/#drive-trashed-only

Thanks so much for the reply. So even when i run "rclone lsd gdrive: --drive-trashed-only" i get errors "2019/10/11 10:46:41 Fatal error: unknown flag: --drive-trashed-only".

any ideas ?

thanks

Download the latest version as your version is many years old.

Thanks that did it.

Yea, ouch - 1.36 is real old. Didn't catch that.

Beware that it seems to be a common issue that rclone in many Linux repositories is often woefully outdated. I strongly recommend you use the install-script right here from the download page.

Yeah i just assumed the repo had the latest. I ran the .sh installer script for rclone all is well thanks guys.

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