We’re huge fans of Backup and Sync — Google’s free Windows utility that continuously synchronizes our PC’s files with drive.google.com.
But lately, the software has been getting in the way on our development machines.
Backup and Sync can consume significant resources
For example, we’ve noticed CPU spikes when several documents are changed simultaneously and uploaded to the cloud.
Backup and Sync causes desktop programs (like Microsoft Word and Excel) to occasionally fail to save their files
In its zeal to immediately process any changes, Backup and Sync can lock files and interfere with the normal saving to disk. Warnings like this (from ToDoList) are all too common:
Updating large files seems to be particularly problematic.
Backup and Sync will show excessive “remove item” confirmations when a file is deleted
Fortunately these notifications are easily disabled via Preferences but the setting is all or nothing. Ideally, we would like to omit confirmations on active development folders but that is not possible.
None of these is a major headache, but little day-to-day annoyances add up. What to do?
Eventually a key realization dawned on us…
We don’t need real-time file synchronization
Backup and Sync’s mission is to keep your files synchronized. As soon as a document is changed, it is copied up to the cloud.
Though a live copy is ideal, it is not essential for our situation. We will be satisfied with a periodic backup — a recent copy of key files in case of a catastrophe. Heck, a single snapshot every 24 hours would meet our modest needs.
With that understanding, our first adjustment was manual. We would simply exit Backup and Sync at the start of the work day and restart it when we were done for the evening. Doing so eliminated the daily annoyances, and gave Backup and Sync the whole night to catch up.
But some evenings we would forget to restart Backup and Sync, leaving our files unprotected. It was time for a robust, automated solution…
How to run Backup and Sync off-hours as a Windows Service
Step 1: Install Backup and Sync as a Windows Service with AlwaysUp
This first step will enable backups to run in the background — even when you’re not logged in to your computer.
Follow our step-by-step guide and you should be up and running in 10 minutes or less:
Step 2: Create a Scheduled Task to stop Backup and Sync every morning at 9 AM
Start Task Scheduler. This is best done by running taskschd.msc from a command prompt, or by opening the Control Panel, searching for “schedule” and clicking the Schedule tasks link:
Once the Task Scheduler window comes up, click Create Basic Task on the right:
In the Create Basic Task Wizard window, enter a suitable name for the task. We suggest “Stop Google Backup Service at 9 AM Daily”. Click Next when you are done.
We want to run daily, so make sure that option is selected and move on:
Next, enter 9 AM in the Start controls:
Running this command will stop the Backup and Sync Windows Service created by AlwaysUp:
NET.EXE STOP "Googledrivesync (managed by AlwaysUpService)"
Enter that command on this screen, placing NET.EXE in the Program/script field and the rest in the Add arguments section:
Don’t forget the quotes!
The next screen summarizes the task we’ve created. There is still a bit of work to do so check the Open the properties dialog box before clicking the Finish button:
And finally, in the Properties window, ensure that the task will (1) run even if no one is logged on and (2) will run with highest privileges:
Click OK to finalize your new scheduled task.
Step 3: Create a Scheduled Task to start Backup and Sync every evening at 7 PM
To create the second task that restarts Backup and Sync in the evening, simply repeat the process you followed in Step 2 with the following adjustments:
Enter 7 PM instead of 9 AM
Replace STOP with START when entering the program to run:
NET.EXE START "Googledrivesync (managed by AlwaysUpService)"
Less timely backups, but less interruptions too
With these changes in place, our Backup and Sync only runs “off hours”. While our files aren’t synchronized with the cloud during the work day, the annoying interruptions have been eliminated. It has been a reasonable trade-off for our team.