moving/renaming files caused data loss?

56 Views Asked by At

Describe the current behavior This afternoon, I used a bash script via Google Colab to move and rename files in our company Google Drive. Following the move and rename a substantial quantity of the files are MIA, while the rest were perfectly moved/renamed.

Describe the expected behavior I expected it to perform the same as my local testing of the script.

What web browser you are using Brave (Chromium)

Additional context Here's the script I ran to perform the rename.

I wanted to rename from YEAR/CLIENT/PROJECT to CLIENT/YEAR_CLIENT/PROJECT

For folders (years) 2012-2016

%%bash
cd ./drive/MyDrive/MY_ARCHIVE_FOLDER &&
for year in {2012..2014}; do # NOTE I DID THIS IN TWO STEPS, 2012-2013, THEN 2014-2016
    for client in "$year"/*; do
        [ -d "$client" ] || continue
        client_name=$(basename "$client")
        mkdir -p "$client_name/$year"_"$client_name"
        for project in "$client"/*; do
            mv "$project" "$client_name/$year"_"$client_name"/
        done
        rmdir "$client"
    done
    rmdir "$year"
done

After doing this, I am missing tons of files that are neither in the new (renamed) location, nor in the file structure of the trashed folder.

What's also strange is that the folders were deleted in a way that causes them to appear in the Trash UI, but none of the deleted files are there.

Worth noting these are about 6-7 TB of files that I'm renaming/moving.

The Drive team advised me to use the restore feature to restore everything from today's session to try to get it back, but I'm not hopeful, as restoring from the Trash in the Drive UI was already unfruitful.

Github issue report here

Even some of the folders that did get moved seem to be missing files. I have a file that was previously evaluated at 73 GB, and downloading it I have only ~688 MB

0

There are 0 best solutions below