File filters in Google Backup and Sync

8

1

Google Backup and Sync provides continuous online backup of selected folders. However one key feature that I'm missing coming from another backup solution is the ability to set exclusion filters for folder/files. Is there an easy way to implement it?

As a developer, my machine constantly generates bin/obj folders all the time that are temporary and should not be backed up. Not only that it results in Google Sync regularly displaying an irritating "Remove warning", it also often locks those folders while uploading, so my IDE fails to subsequently build my code.

dotNET

Posted 2017-08-12T03:55:57.687

Reputation: 481

Developper too, same problem ! – Entretoize – 2017-09-19T10:22:48.137

Answers

1

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

Seb Andraos

Posted 2017-08-12T03:55:57.687

Reputation: 111

3Thanks for the input. I do use BitBucket for code commits. However you need to realize that BitBucket, GitHub or any code repository is not a continuous backup solution. They do not monitor files and folder for changes to automatically initiate backup process. – dotNET – 2017-09-21T14:32:27.233

You can try EngineOne. We've also been looking for a solution to the same problem, but didn't find any. Disclosure: I'm one of the founders.

– Sthe – 2018-03-04T13:21:13.813

1

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

Hüseyin Yağlı

Posted 2017-08-12T03:55:57.687

Reputation: 167

1Have you actually checked whether this setting works on folders? When I tested it last (several months ago), it only work on file extensions, not folders (because folders do not have extensions). – dotNET – 2018-10-17T15:55:40.510

1@dotNET Yes, It works only on file extensions. – Hüseyin Yağlı – 2018-10-18T07:10:56.313

0

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.

dotNET

Posted 2017-08-12T03:55:57.687

Reputation: 481

Any OSX or Linux alternatives to FreeFileSync? – TabsNotSpaces – 2019-12-19T23:54:55.517

@TabsNotSpaces: FreeFileSync does have Linux and mac builds. Did you check the download page?

– dotNET – 2019-12-20T04:50:49.120