Quantcast
Channel: ProgrammableWeb - Node.js
Viewing all articles
Browse latest Browse all 1601

Pryv App Node Backup

$
0
0
Simple Node.js script to backup your Pryv data.<br><br> In your terminal, run the following commands:<br><code>npm install</code><br> to download required dependencies<br><code>npm start</code><br> to launch the backup script.<br><br> This will ask you for the domain, username and password of the Pryv account you wish to back up<br><br><br><strong>Format</strong> Your data will be downloaded in <code>./backup/{username}.{domain}/</code><br><br> This downloads the following in JSON format:<ul><li>Public profile</li><li>Accesses</li><li>Followed slices</li><li>Streams</li><li>Events</li><li>Account Info</li></ul><br> As well as the following in binary files:<br><ul><li>Attachment files</li></ul><br><strong>Running conditions</strong><br> The operation might take a while in case the data size is substantial. Please, leave requests <a href="https://github.com/pryv/app-node-backup/issues">here</a>.<br><br><strong>As a package</strong><br> It is also possible use the backup function in your code.<br><br> Add the following to your <code>package.json</code>: <code>"pryv-backup":"git+ssh://git@github.com:pryv/app-node-backup.git"</code><br><br> then use it as following:<br><code><pre> var backup = require('pryv-backup'); var settings = { username: USERNAME, domain: DOMAIN, // optional password: PASSWORD, includeTrashed: true, // default: false includeAttachments: true // default: false }; settings.backupDirectory = new backup.Directory(settings.username, settings.domain); backup.start(settings, function (err) { if (err) { // manage error } // ... }); </pre></code>
Related APIs: 
Pryv
Sample Source Code Image: 
Deadpool: 
0
Primary Category: 
Secondary Category: 
Related Platform / Languages: 
Sample Source Code Provider: 
Version: 
1.0
Sample Code Does Not Belong To A Company: 
0

Viewing all articles
Browse latest Browse all 1601

Trending Articles