Accidentally did "rclone purge" on a gdrive crypted backend, and would like to undo it. Forgot it doesn't take an —include flag. Oops. I checked in my gdrive trash to see if the files were there. Nope. I'm also admin of the GSuite account (I'm an enterprise customer) and I did a "Restore Data" from the last two days for that user. That doesn't seem to have helped either - though I'm not sure how long the restore data job would take, I've got about 50TB of files in that data directory.
Any suggestions on how I might be able to recover the data? I realize it was my own fault, and rclone is working correctly. I thought I'd read that purge moved things to the bin, but I've gone to drive.google.com logged in a haynes, and don't see them in the bin. There were some files there that I restored, but they are just a directory I'd deleted a few days ago.
Am I just out of luck? I have about 10TB of the original files still lying around, and I have an old backup for maybe half of the others but I'd like to avoid the pain of recovering files piecemeal if at all possible (and losing about half of the data.)
Run the command 'rclone version' and share the full output of the command.
rclone v1.66.0
os/version: darwin 14.5 (64 bit)
os/kernel: 23.5.0 (arm64)
os/type: darwin
os/arch: arm64 (ARMv8 compatible)
go/version: go1.22.1
go/linking: dynamic
go/tags: none
Which cloud storage system are you using? (eg Google Drive)
Google Drive (crypted)
The command you were trying to run (eg rclone copy /tmp remote:tmp)
[Edited to add]
Used the admin tools to look at the GDrive log, and it does say that things got moved to the bin, so will go looking for other bins that might be possible to undo.
Talked to Google Support, they say that the user "Restore Data" project should eventually restore the files and send an email when it's complete. Will update this when/if that happens.
Did not get an email, but using the drive log investigation tool shows as many items removed from bin as were put in the bin in the appropriate time period, so I'm going to assume the "Restore Data" did the trick. That's a relief.
As a small suggestion, maybe the purge command could check for "include*" "exclude*" "filter*" or "files-from*" flags and either error out or ask for confirmation if there are any present.
The problem with this is that if a remote supports directory delete, then purge uses that so it may not even have the chance. When I purge on OneDrive, it deletes the whole directory as opposed to each file.
yes, you are correct about that but imho, the OP issue is is not about that.
purge is a dangerous command, and the OP made a mistake and there are other topics about that.
purge does not support filters but also, purge does not complain if a filter is used.
as a safety, perhaps rclone should error out in that case.
in addition, i am suggesting that before purge does its dirty deed, rclone should display a warning or error out.
even dumb dos has a warning.
del d:\files\tmp\* /s
d:\files\tmp\*, Are you sure (Y/N)?