kik-o / datocms-backups-scheduled-netlify-function

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Scheduled backups Netlify function

This is a collection of lambda functions and scheduled functions meant to be used with this DatoCMS plugin to automatically backup your main environment on a daily and weekly manner.

You can also deploy this project to netlify through this one-click-deploy

It consists of two scheduled functions that fork and replace old backups with new ones (if the old backups are not being used), making it so there is always a daily backup environment, and weekly backup environment. Additionally, it also has a "initialization" lambda function that connects the plugin with the netlify instance.

Enabling the "Scheduled function" feature on Netlify

This project requires a experimental Netlify feature called "Scheduled functions"

It has to be enabled on your Netlify account, and then activated on your deployed instance. Heres how to do so:

First, enable the feature on your Netlify Labs page:

image

Then, in the deployed instance of this repository go to the Functions tab, and click "Enable Scheduled Functions"

image

And thats it! Now the functions are scheduled to run once a day and once a week respectivelly for as long as your netlify instance is active.

About


Languages

Language:TypeScript 100.0%