The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,908 other followers

Archive for the ‘GoogleDrive’ Category

Cleaning up Google Drive (for instance when a rogue supplier decides to fill your Windows Documents folder) and preventing TomTom HOME to use too much information

Posted by jpluimers on 2022/04/12

The below links helped me clean the Google Drive of a friend that grew way too large because TomTom HOME decided to put 100 gigabyte of data in the Documents folder instead of the local AppData folder (yup, this is a follow-up of Windows applications: storing your data in the correct place (Roaming, Local, LocalLow, not Documents)).

The trick with extensions to exclude is you have to add exclusions before syncing. Which is a kind of catch-22 or chicken and egg problem.

In case of the friend I helped we made a backup of the TomTom HOME data, then applied the exclusions and restored the data.

For TomTom HOME in order not to fill your Google Drive, but still allow backing up your Documents folder, these are extensions you might want to exclude (roughly in descending order of space) where you have to mind not storing any of these extensions in other subfolders of your Documents folder.:

  • .zip
  • .cab
  • .toc
  • .tmp
  • .meta
  • .sat
  • .tlv
  • .ttd
  • .dat
  • .vif
  • .chk
  • .bin
  • .rex
  • .lde
  • .gpr
  • .dbl
  • .so
  • .ov2

The problem with this? Google Backup and Sync does not allow that many exclusion extensions.

–jeroen

Posted in Google, GoogleBackupAndSync, GoogleDrive, Power User, Windows, Windows 10 | Leave a Comment »

Speed up Upload and Download Speeds in Google Backup and Sync (formerly Google Drive)

Posted by jpluimers on 2022/03/31

[Wayback] Speed up Upload and Download Speeds in Google Drive is still relevant, despite the name change of Google Drive to Google Backup and Sync.

In my experience (fiber 100 mebibit symmetric with less than 5 milliseconds latency to the Amsterdam Internet Exchange) the only option that really matters is to set the Proxy Settings from “auto-detect” to “direct connection”. This saves as much as 25% on latency, which plays a big role when syncing many small files.

These are the steps in pictures:

Read the rest of this entry »

Posted in Google, GoogleBackupAndSync, GoogleDrive, Power User | Leave a Comment »

Workaround to add a Shared With Me folder to your Google Drive (Google made this a lot harder in 2020)

Posted by jpluimers on 2022/02/21

It took a few tries to Google how to sync folders that were shared after roughly fall 2020 (folders shared with me before that were totally fine), but [Wayback] drive google shared with me – Google Search got me the below answer.

From [Wayback/Archive.is] Google completely ruined shared folders in Drive (Update: Workaround, Google shares longterm plan):

you can still move shared files and folders to your Drive, even on the web (no need for the Android app), but the option is hidden behind a keyboard shortcut. Go to your Shared with me section, highlight the shared files or folders you want to move, and type Shift+Z on your keyboard. You’ll see the old move menu and can choose where to put those folders. On your PC, they’ll sync and behave like they used to, no shortcut mess. More info can be found here, and you can always type ? in Drive to bring up the list of keyboard shortcuts if you forget this one.

Finally, Remy revealed that the Drive team will “keep this behavior [Shift+Z] around for folders until we have a solid solution to sync shared folders.” I think that helps appease our collective fears about the change.

From the page linked at [Wayback] Find files & folders with Google Drive shortcuts – Computer – Google Drive Help:

Shortcuts can sync across your devices, including computers and smartphones. But when you use Backup and Sync to connect with a computer, there are some differences. The shortcuts you made to individual files will sync up with the file as normal. But the shortcuts you made to shared folders will just link to the folder on the Google Drive website.

Try these alternatives:

  • Instead of a shortcut, add the folder to an additional location. On the Google Drive website, select the folder and press Shift + Z. 
  • Add shortcuts to individual files within the shared folder (and not to the shared folder itself).
  • If you’re a Google Workspace user, learn more about Drive File Stream.

–jeroen

Posted in Google, GoogleDrive, Power User | Leave a Comment »

Google Cloud Shell: connecting to cloud storage buckets

Posted by jpluimers on 2021/09/28

One of the drawbacks of Google Cloud Shell is that it will delete the home directory after 120 days of not using it: [WayBack] Deletion notice for my Google Cloud Shell home directory – Stack Overflow

This is documented [WayBack] here:

If you do not access Cloud Shell for 120 days, we will delete your home disk. You will receive an email notification before we do so and simply starting a session will prevent its removal.

This only applies to the home directory of your Cloud Shell instance (you may want to store it on Cloud Storage anyway if you want to keep it). Any other Google services you use will be unaffected.

I hardly use the cloud shell, as it is a last resort to shell out from overly protected networks. Fewer and fewer environments restrict so much, so I’ve bumped into the home directory deletion a few times now.

I might use it more in the future, as I recently discovered there is a URL trick so you can start a cloud shell with parameters like an initial git repository: [WayBack] Open in Cloud Shell  |  Google Cloud

The Open in Cloud Shell feature allows you to publish a link that opens the Cloud Console and either automatically clones a Git repository into Cloud Shell or starts Cloud Shell with a custom image. It also allows for instructions to be printed to the terminal to help users interact with the content.

The Open in Cloud Shell feature helps developers experiment with code samples and APIs without having to worry about downloading Cloud SDK, installing required dependencies, or searching for relevant source files. This page explains how to add this feature to your Git repository.

Currently, only GitHub and Bitbucket repositories are whitelisted. If you would like to add a different repository, send feedback with the repository type you’d like to use with Open in Cloud Shell.

Setting up the home directory with my scripts can be a curse, so I have contemplated on these kinds of solutions:

  • store scripts in Google Drive, and mount part of Google Drive into the Cloud Shell
  • store scripts in Google Cloud Storage
  • script the setup of the home directory via a bash script in a gist

Some links that will hopefully help me with that:

  • [WayBack] Use the Google Cloud Shell to Upload files to Google Drive : DataHoarder
  • [WayBack] Open Your Repository In Google Cloud Shell – Daisuke Maki – Medium
  • [WayBack] gsutil – Google cloud storage – Download file from web – Stack Overflow

    mount the bucket in your Cloud Shell using gcsfuse:

    Create a directory in your Cloud Shell user home

     mkdir ~/mybucket
    

    Now mount your bucket in that directory using gcsfuse:

     gcsfuse bucket_name ~/mybucket
    

    Change the current directory to mount point directory:

     cd mybucket
    

    (if you want to have some fun run “df -h .” to see how much space you got in that mount point)

    seems to work for all file sizes:

     curl http://speedtest.tele2.net/10GB.zip | gsutil cp - gs://YOUR_BUCKET_NAME/10GB.zip
    

    Basically curl “streams” the data directly to the bucket.

  • [WayBack] Limitations and restrictions  |  Cloud Shell  |  Google Cloud

    Usage limits

    Cloud Shell inactivity: If you do not access Cloud Shell for 120 days, your home disk will be deleted. You will receive an email notification before its deletion and simply starting a session will prevent its removal. Please consider a different solution on Google Cloud storage for sensitive data you wish to store long term.

    Non-interactive usage: Cloud Shell is intended for interactive use only. Non-interactive sessions will be ended automatically after a warning. Note that Cloud Shell sessions are capped at 12 hours, after which sessions are automatically terminated. You can use a new session immediately after.

    Weekly usage: Cloud Shell also has weekly usage limits. If you reach your usage limit, you’ll need to wait until the specified time (listed under Usage Quota, found under the three dots menu icon) before you can use Cloud Shell again.

    Restoring a session after a service limit violation: If your session is terminated or cannot be established because you exceeded a service limit, Cloud Shell will display an error with a link to a form that allows you to appeal the limit violation. Click the feedback link and submit the form with more information about the tasks you were performing before your session was terminated.

–jeroen

Posted in bash, Development, Google, GoogleCloudShell, GoogleDrive, Internet, Power User, Scripting, Software Development, SpeedTest | Leave a Comment »

Google Drive is not telling it secretly moves files to the trash

Posted by jpluimers on 2021/04/12

A while ago, Google Drive told me it was out of storage.

I tried re-syncing, and then it suddenly told me a “Drive storage is full” message indicating “You have 3GB in your trash at drive.google.com. Empty your trash or upgrade your storage”.

You can view your trash at drive.google.com/drive/trash

Emptying is more tricky than you’d think:

  1. Click on the “Trash word” (not the trash icon!)
  2. Click om “Empty trash”
  3. Conform the action

     

  4. wait a few seconds, as often the trash will fill itself up again
  5. if it refilled: repeat from step 2.
  6. refresh your browser screen, as often then the trash will refill
  7. if it refilled: repeat from step 2.

The trash contained thousands of temporary PDF files: 3.2 GB, even more than Google Drive indicated.

These are not something I want to keep in the trash. Too bad Google Drive never warned me they were kept there.

On a different account that had way more file changes this saved more than 27 GB.

Maybe time to setup [WayBack] Google Drive Sensor | PRTG Network Monitor User Manual

Might be really interesting, as since 2015, [WayBack] PRTG 100 is Now Available For Free.

–jeroen

Posted in Google, GoogleDrive, Power User | Leave a Comment »

 
%d bloggers like this: