Anyone know a good way to undelete data on a teamdrive? All the info available on the forum are outdated / not working or slow due to copying media etc.
I've mounted a second mount of my teamdrive with the --drive-trashed-only flag and the data shows up fine, it should be moved back to the original mount again but I can't for the life of me get it to work. if I do a move using rclone move --drive-trashed-only --drive-server-side-across-configs recovery:directory to teamdrive:directory no content shows up, my guess is because the file still got the "trashed" flag. When I do a rclone copy --drive-trashed-only --drive-server-side-across-configs recovery:directory to teamdrive:directory it starts out fast with server side copy but after some hours slows to a crawl. Moving it via the web interface also doesn't work. I've tried an untrash go binary from here but its from 2018 so probably not working anymore, wasn't doing much for me.
While I know it's a niche feature a documented way of untrashing would be nice. The GUI of drive is a mess when using rclone and encrypt. I've resorted to merging the files into my storage cluster via some bash magic so all should be well.
I had a go at implementing an untrash backend command based on @B4dM4n 's work - we didn't have the backend command framework when he wrote that otherwise he would have probably put in there himself!
Testing it now and seems to work fine! Running it on a not so important directory and it's untrashing it without any issues. I assume this doesn't do anything with limits imposed in gdrive / teamdrive as it's just setting the file from trashed to not trashed?
I'll run it on the rest as well, beats having to copy it all
Perfect! Thanks for the quick implementation. I'm running it now on the mount with --drive-trashed-only and it's going nicely, got the same one mounted without --drive-trashed-only and you can see the dir size going down on the one with --drive-trashed-only and going up on the one without --drive-trashed-only.
While it's always better to make sure nothing catastrophic can happen to your data, a way to easily undelete it via rclone is a godsend.
And last tip: ALWAYS check your variables and test your end command before commit, running it for a day and come back to missing a chunk of data
@ncw, maybe it is possible to make that this command would be passed from crypt (especially), chunk, cache (and other possible ones) backends if they are all encapsulating drive backend bellow them? That would be really awesome addition.Thank You.