File filters in Google Backup and Sync

Solution 1:

OK. So I got it working finally. Here is the method, step by step:

  1. Use FreeFileSync to create a clean copy of your drive at a different location. For example, if you want to backup your D:\ drive, you can create an empty folder on E:\ drive named D_Backup or something.
  2. FreeFileSync allows all kinds of exclusion filters (much like .gitignore) including wildcards and sub-folder matching. So exclude all of those unnecessary folders (bin, obj, packages, vendor, node_modules, debug, release) in the exclusion filters.

enter image description here

  1. Use Mirror mode to make update process one-directional, since you don't want it to affect original source files (D:\ drive in our example). Use Permanent Deletion so that your Recycle Bin doesn't get filled.

enter image description here

  1. Save this configuration as a Batch Configuration in FreeFileSync so that you could run it from command line. Turn on Run Minimized and Auto-Close options.

  2. Sync this folder with Google Backup and Sync.

  3. Using Windows Task Scheduler, create a task that runs daily (or whatever frequency you prefer) and runs FreeFileSync to update D_Backup. Google Backup and Sync constantly monitors that folder for changes and will start backup automatically. In the Action step, choose Run a program and choose C:\Program Files\FreeFileSync\RealTimeSync.exe (or where you installed FreeFilesSync). In the Add Arguments box, type the full path of the batch file that you save in step 4 above (surround path with double-quotes if it contains spaces). More information on this is available here.

enter image description here

My Google Drive that was near full is now at less than half way mark. As an added advantage, the Backup & Sync software doesn't keep my processor busy at all times, since the task runs only once a day, which I have set to run at lunch time.

Hope this helps people down the road.

Solution 2:

Unfortunately Google Backup and Sync (formerly Google Drive) does not have that capability (source: a long time trying to do the same). That said I would suggest, as a developer, you look at alternatives for backing up your code that are more tailored to that work. One commonly used example is GitHub which includes a .gitignore file which can skip specific folders, files or extensions. Check GitHub out here https://guides.github.com/activities/hello-world/ or https://en.wikipedia.org/wiki/List_of_version_control_software for alternatives

Solution 3:

You can add an extension filter in the options of Backup and Sync.
But it doesn't work on the main google drive folder.
The filter works only in the additional folders that you add in My Computer tab.

Options window