Pushbuild

Back up a Google Drive folder automatically every week

A free Google Apps Script that copies a Drive folder, subfolders included, into a dated backup every week and keeps only the last few.

Short answer: Use a free Google Apps Script that copies a Drive folder, subfolders included, into a dated backup every week and keeps only the last few. It runs in your own Google account; nothing is sent to us. Setup takes 4 steps: Make a Settings tab; Paste the script; Run a first backup; Back up every week.

How to set it up

  1. Make a Settings tab. Open a new Google Sheet and add a tab called Settings. Paste the link of the folder to back up in B1. In B2, type how many weekly backups to keep, such as 4.
  2. Paste the script. Open Extensions, then Apps Script, paste in the code from our email, and save. Reload the sheet and a Backup menu appears.
  3. Run a first backup. Choose Backup, then Back up now. A folder called Drive backups appears in your My Drive, holding a copy of your folder named with today's date.
  4. Back up every week. Choose Backup, then Back up every week. It runs every Sunday night. Once there are more backups than your number in B2, the oldest go to the Drive bin.
Setup, step by step: 4 steps, done in your own Google account.

Want this set up for your business? Free written scope in 20 minutes

Get the script

Download it free

We'll email you the script (Code.gs). It runs in your own Google account; nothing is sent to us.

By continuing, you agree that Pushbuild may email you about this script and related tips. Unsubscribe any time. Privacy

Have us install it for you

We set it up in your Google account in a short Connect session, connect it to your sheet and check that it runs.

Have us install it

Good to know

  • Apps Script stops a run after 6 minutes, so this suits folders of up to a few hundred files.
  • Backups count toward your Google storage. Keep fewer copies if space is tight.
  • For one spreadsheet backed up every night, see our nightly sheet backup script.

Questions

What does this script do?

It is a free Google Apps Script that copies a Drive folder, subfolders included, into a dated backup every week and keeps only the last few.

How do I set it up?

In 4 steps: 1. Make a Settings tab; 2. Paste the script; 3. Run a first backup; 4. Back up every week. The full steps are on this page.

Is it free, and does it send my data anywhere?

It is free: enter your email on this page and we email you the script (Code.gs). It runs in your own Google account; nothing is sent to us.

Can you install it for me?

Yes. We set it up in your Google account in a short Connect session, connect it to your sheet and check that it runs.

Want this connected to the rest of your tools? Send us a short brief.

Pushbuild · Automate your business with Pushbuild: pushbuild.com/contact