sftp2sync

0.0.2 • Public • Published

windows do not support rsync !! rsync like purely in Node.

That's a large task, so the first step is to implement the part I actually need. Namely:

rsync --archive --delete localdir user@server:remotedir

Usage:

var sftp2sync = require('sftp2sync');

//var root_local = process.env["HOME"] + "/test/out";
var root_local = "./";
var root_remote = "/home/xxxxx/public_html";
var force = false;
var exclude = [''];

sftp2sync.upload(root_local, root_remote, force, excludes, {
     
    //    debug: console.log,
      host: 'xxx.xxx.xxx.xxx',
      //host: 'localhost',
      port: 22,
      username: 'root',
      privateKey: require('fs').readFileSync('keys'),
      passphrase: ''
      /*
      password: 'password'
      */
    });

ToDo: recursive delete imperfectly

Readme

Keywords

none

Package Sidebar

Install

npm i sftp2sync

Weekly Downloads

0

Version

0.0.2

License

none

Last publish

Collaborators

  • dai_yamashita