Created
May 2, 2015 11:55
-
-
Save fergiemcdowall/a20a1b67811611f4c6cc to your computer and use it in GitHub Desktop.
Make a snapshot of a search-index
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var si = require('search-index')({logLevel:false}); | |
var fs = require('fs'); | |
si.snapShot(function(rs) { | |
rs.pipe(fs.createWriteStream('backup.gz')) | |
.on('close', function() { | |
console.log('great success dear leader') | |
}) | |
.on('error', function() { | |
console.log('err') | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment