node-rsync is a Node.js library that provides a programmatic interface for building and executing `rsync` commands. It functions as a wrapper around the system's `rsync` utility, allowing developers to construct complex synchronization commands using a fluent API in JavaScript or TypeScript applications. The current stable version is 0.6.1. Releases are infrequent, typically addressing specific bugs or adding minor enhancements (such as Windows path support), rather than following a strict cadence. Its primary utility lies in automating file synchronization, backup tasks, and deployments within Node.js environments by abstracting the command-line intricacies of `rsync` into a more manageable, object-oriented structure.
npm install rsyncVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to initialize an Rsync instance, configure a basic remote synchronization command using SSH, common flags (archive, compress), and then execute it with error handling.
Ensure `rsync` is installed on your operating system. For Linux (Debian/Ubuntu): `sudo apt-get install rsync`; for macOS: `brew install rsync`; for Windows: utilize WSL, Cygwin, or a similar environment with `rsync`.
Always consult the official `rsync` man page (`man rsync`) or documentation for correct options and syntax. Test complex `rsync` commands directly on the command line before integrating them into `node-rsync`.
Upgrade to `node-rsync` version 0.6.1 or newer, which includes explicit support for Windows file paths under Cygwin. If upgrading isn't possible, ensure all paths are strictly POSIX-style (e.g., `/cygdrive/c/path`) and avoid native Windows path separators.
Install the `rsync` utility on your system. For example, `sudo apt-get install rsync` (Linux), `brew install rsync` (macOS), or ensure it's available in your chosen Windows environment (e.g., WSL, Cygwin).
Call `rsync.command()` to inspect the full `rsync` command string. Execute this string manually in your terminal to debug the `rsync` error directly, then adjust your `node-rsync` builder calls accordingly.
Verify that both your source and destination paths are correct, exist, and have appropriate read/write permissions for the user executing the `node-rsync` process. For Windows, ensure paths are correctly formatted (e.g., using `/` instead of `\` or correctly mapping Cygwin paths).
No dependency data recorded yet.