{"id":13828456,"url":"https://github.com/xobotyi/rsync","last_synced_at":"2025-03-27T02:12:07.356Z","repository":{"id":57084755,"uuid":"128805422","full_name":"xobotyi/rsync","owner":"xobotyi","description":"rsync dependency-free wrapper library for PHP7.1+","archived":false,"fork":false,"pushed_at":"2020-05-21T15:32:24.000Z","size":64,"stargazers_count":95,"open_issues_count":1,"forks_count":6,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-17T14:09:28.145Z","etag":null,"topics":["php","rsync","rsync-wrapper"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xobotyi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"patreon":"xobotyi"}},"created_at":"2018-04-09T16:55:05.000Z","updated_at":"2024-08-19T05:22:23.000Z","dependencies_parsed_at":"2022-08-25T00:50:17.881Z","dependency_job_id":null,"html_url":"https://github.com/xobotyi/rsync","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xobotyi%2Frsync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xobotyi%2Frsync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xobotyi%2Frsync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xobotyi%2Frsync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xobotyi","download_url":"https://codeload.github.com/xobotyi/rsync/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245767356,"owners_count":20668826,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["php","rsync","rsync-wrapper"],"created_at":"2024-08-04T09:02:47.656Z","updated_at":"2025-03-27T02:12:07.332Z","avatar_url":"https://github.com/xobotyi.png","language":"PHP","readme":"\u003ch1 align=\"center\"\u003eRsync\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://packagist.org/packages/xobotyi/rsync\"\u003e\n        \u003cimg alt=\"License\" src=\"https://poser.pugx.org/xobotyi/rsync/license\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://packagist.org/packages/xobotyi/rsync\"\u003e\n        \u003cimg alt=\"PHP 7 ready\" src=\"http://php7ready.timesplinter.ch/xobotyi/rsync/badge.svg\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://travis-ci.org/xobotyi/rsync\"\u003e\n        \u003cimg alt=\"Build Status\" src=\"https://travis-ci.org/xobotyi/rsync.svg?branch=master\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://www.codacy.com/app/xobotyi/rsync\"\u003e\n        \u003cimg alt=\"Codacy Grade\" src=\"https://api.codacy.com/project/badge/Grade/ba7d63cf54844f5480d6b3a58c1534a7\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://scrutinizer-ci.com/g/xobotyi/rsync/\"\u003e\n        \u003cimg alt=\"Scrutinizer Code Quality\" src=\"https://scrutinizer-ci.com/g/xobotyi/rsync/badges/quality-score.png?b=master\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://www.codacy.com/app/xobotyi/rsync\"\u003e\n        \u003cimg alt=\"Codacy Coverage\" src=\"https://api.codacy.com/project/badge/Coverage/ba7d63cf54844f5480d6b3a58c1534a7\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://packagist.org/packages/xobotyi/rsync\"\u003e\n        \u003cimg alt=\"Latest Stable Version\" src=\"https://poser.pugx.org/xobotyi/rsync/v/stable\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://packagist.org/packages/xobotyi/rsync\"\u003e\n        \u003cimg alt=\"Total Downloads\" src=\"https://poser.pugx.org/xobotyi/rsync/downloads\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n## About  \nRsync is a pure PHP 7.1+ dependency-free wrapper for rsync client. It provides you a simple way to abstract from command line control rsync right from php. Library uses PSR-4 autoloader standard and always has 100% tests coverage.  \nThere is no need to tell about rsync, except the fact that php doesn't has any faster or equal built-in way to upload files to remote server.\n\nLibrary supports whole bunch of options and parameters implemented in rsync client version 3.1.2 \n\n## Why Rsync?\n1) It is small and fully covered with tests\n2) It is well documented\n3) I'm eating my own sweet pie=)\n4) Supports whole bunch of parameters and options of rsync and ssh\n5) Easy to use\n6) Works on Windows (ofcourse id you installed ssh and rsync clients for Windows)\n\n\n## Requirements\n- [PHP](//php.net/) 7.1+\n- PHP config `variables_order` must contain `E`, 4ex: `variables_order=EGPCS`.  \nOtherwise you will have to manually specify absolute path to rsync and ssh binaries (at least on Windows)\n- rsync client 3.1.2 +\n\n## Installation\nInstall with composer\n```bash\ncomposer require xobotyi/rsync\n```\n\n## Docs\nThe code is well documented, for methods and parameters descriptions see the sources.\n\n## Usage\n_Simplest:_\n```php\nuse xobotyi\\rsync\\Rsync;\n\n$rsync = new Rsync();\n$rsync-\u003esync('/path/to/source', '/path/to/destination');\n```\n_If you need SSH:_\n```php\nuse xobotyi\\rsync\\Rsync;\nuse xobotyi\\rsync\\SSH;\n\n$rsync = new Rsync([\n                       Rsync::CONF_CWD        =\u003e __DIR__,\n                       Rsync::CONF_EXECUTABLE =\u003e '/even/alternative/executable/rsync.exe',\n                       Rsync::CONF_SSH        =\u003e [\n                           SSH::CONF_EXECUTABLE =\u003e '/even/alternative/executable/ssh.exe',\n                           SSH::CONF_OPTIONS    =\u003e [\n                               SSH::OPT_OPTION              =\u003e ['BatchMode=yes', 'StrictHostKeyChecking=no'],\n                               SSH::OPT_IDENTIFICATION_FILE =\u003e './path/to/ident',\n                               SSH::OPT_PORT                =\u003e 2222,\n                           ],\n                       ],\n                   ]);\n$rsync-\u003esync('./relative/path/to/source', 'user@some.remote.lan:/abs/path/to/destination');\necho './relative/path/to/source ' . ($rsync-\u003egetExitCode() === 0 ? 'successfully synchronized with remote.' : 'not synchronised due to errors.') . \"\\n\";\n\n$rsync-\u003esetExecutable('ssh')\n      -\u003esetOption(SSH::OPT_OPTION, false)// 'false' value turns off the options\n      -\u003esetOptions([\n                       SSH::OPT_IDENTIFICATION_FILE =\u003e './new/path/to/ident',\n                       SSH::OPT_PORT                =\u003e 22,\n                   ]);\n$rsync-\u003esync('/new/path/to/source', 'user@some.remote.lan:/abs/path/to/destination');\necho '/new/path/to/source ' . ($rsync-\u003egetExitCode() === 0 ? 'successfully synchronized with remote.' : 'not synchronised due to errors.') . \"\\n\";\n```\n\n","funding_links":["https://patreon.com/xobotyi"],"categories":["PHP"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxobotyi%2Frsync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxobotyi%2Frsync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxobotyi%2Frsync/lists"}