When installed globally, the backup
generator is available to use through the gen
command:
Backup a folder to a tar file using the default task.
$ gen backup --src my-project --dest /backups/my-project
Extract a tar file to a folder using the extract task.
$ gen backup:extract --src /backups/my-project/2017-01-02.tar --dest my-project-2
Params
app
{Object}: generate instance to add tasks to.
Example
// use as a plugin with existing generate instance
// $ gen backup
app.use(require('generate-backup'));
// use as a subgenerator on an existing generate instance
// $ gen bkp
app.register('bkp', require('generate-backup'));
Internal functions that are used inside the tasks to provide backup and extract functionality.
{%= apidocs('lib/*.js') %}