rsync
import { rsyncPush, rsyncPull } from 'sysopkit/op/rsync';rsyncPush()
Section titled “rsyncPush()”IDEMPOTENT
Syncs local to remote. Returns array of change entries.
const changes = await rsyncPush({ src: '/local/path/', dst: '/remote/path/', flags: ['-az', '--delete'],});rsyncPull()
Section titled “rsyncPull()”IDEMPOTENT
Syncs remote to local.
const changes = await rsyncPull({ src: '/remote/path/', dst: '/local/path/',});Options
Section titled “Options”| Option | Description |
|---|---|
src | Source path |
dst | Destination path |
flags | Additional rsync flags |
remove | Remove extra files on destination |
user / group | Ownership settings |
usermap / groupmap | User/group mapping |
rsyncPath | Custom rsync binary path |
Return type: RsyncEntry[] with type, action (sent/created/touched/deleted), and path.