Google Drive SQLite Reference

As a reference, here are the databases Google uses (as per 20230206), as I could not find this anywhere on the internets. Reason I was diving deeper into this: I have a 4+ million files GDrive (0.6TB) and a resync (data already local) on a new machine took several months to complete while running the machine at ~7% CPU with 8GB mem usage. I wanted to see the synchronization progress as the GUI did not provide it.

Files:

  • experiments.db
  • metrics_store_sqlite.db (from root folder)
  • root_preference_sqlite.db
  • chunks.db
  • metrics_store_sqlite.db (from the data folder)
  • mirror_metadata_sqlite.db (this is the BIG and juicy one)
  • mirror_sqlite.db (the current workload)

Some other keywords:

  • C:\Users\UserName\AppData\Local\Google\DriveFS\
  • /depot/branches/drive_fs_release_branch/0.0/google3
  • Mirror root context menu for multiple items is not supported.
  • Passthrough is not supported, GL is disabled, ANGLE is
  • Crashpad: The system cannot find the file specified.
  • C:\Program Files\Google\Drive File Stream\0.0.0.0\GoogleDriveFS.exe
  • C:\Users\UserName\AppData\Local\Google\DriveFS\Logs\drive_fs.txt

The mirror_metadata_sqlite.db file contained the table stable_ids that lists files that look ready (a rowcount indicated the work that was done) and via PowerShell I did a total file count on my GDrive folder to calculate the difference.

mirror_sqlite.db calculates hashes (local_md5_checksum, cloud_md5_checksum) on both the could and local to see if files need updating. It also tracks file names (local_filename, cloud_filename), filetime (local_mtime_ms, cloud_mtime_ms), etc.

SELECT COUNT(stable_id) FROM stable_ids;

PS: The “why is this important” question: because it will not sync newer versions of files until it processed the rest, so that means manual updating local files with the cloud files. Note: this causes new file versions, so requires extra storage (I have not yet found a way to prevent this).

PPS: Google Support is really really bad – they made me jump through stupid hoops on repeat with no answers or results. See also this link as to why you should not buy their WiFi hardware and if you buy a Nest Security Camera, they promise replacement cameras if they get stolen, but after weeks of emailing, the manager decided: no. So, use BackBlaze and Ubiquity!


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *