Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including contentpull-backup with all npm packages installed. Try it out:

var contentpullBackup = require("contentpull-backup")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

contentpull-backup v1.0.0

A Contentpull extension for creating a local backup of your space and contents.

contentpull-backup

Used to create a local backup of a space with contentpull.

Download

You can download contentpull-backup via npm.

npm i contentpull-backup --save

Installation

contentpull-backup extends into *contentpull directly.

const Contentpull = require('contentpull');
Contentpull.use(require('contentpull-backup'));

How to use

The backup process runs pretty easily. Simply create a new client with your spaceid and the apikey. After that, run the backup process by calling it on the client with a parameter informing the backup system where to save the file.

const puller = new Contentpull('spaceid', 'apikey');
puller.backup('./backup.json').then(() => {
    console.log('backup complete!');
})

Parameters

  • saveLocation (String) - Where to save the file. It is wrapped in path.resolve so you can use a local location.
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free