This tutorial demonstrates how to use Google Apps Script to:
-
Create copies of the Google Sheet in the desired destination folder automatically at set intervals.
-
Append the time stamp with each backup file's name.
-
Adjust time trigger for backing up every day/hour/minute.
Thanks for the post! It is helpful! Since the post is a bit old, you may encounter some issues with running it. Here is how you solve this error:
Error:
Exception: You do not have permission to call DriveApp.getFolderById. Required permissions: (https://www.googleapis.com/auth/drive.readonly || https://www.googleapis.com/auth/drive)
Solution:
1/ Open AppsScript => Project settings (gear icon on left), and check the box "Show "appsscript.json" manifest file in editor"
2/ Go back to the editor and you'll find an "appsscript.json" file that showed up. Add the following lines of code:
3/ Delete the trigger you already made and create a new one. And the problem is solved!
Happy coding!