{"id":20950132,"url":"https://github.com/richie765/psync","last_synced_at":"2026-05-21T02:02:51.292Z","repository":{"id":24222629,"uuid":"27614840","full_name":"Richie765/psync","owner":"Richie765","description":"Bidirectional File Synchronizer written in Perl","archived":false,"fork":false,"pushed_at":"2016-11-27T14:31:10.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-19T22:39:52.490Z","etag":null,"topics":["file-syncing","perl"],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"artistic-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Richie765.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-05T23:33:46.000Z","updated_at":"2017-02-14T16:24:27.000Z","dependencies_parsed_at":"2022-08-22T12:31:40.019Z","dependency_job_id":null,"html_url":"https://github.com/Richie765/psync","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Richie765%2Fpsync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Richie765%2Fpsync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Richie765%2Fpsync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Richie765%2Fpsync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Richie765","download_url":"https://codeload.github.com/Richie765/psync/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243345611,"owners_count":20275872,"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":["file-syncing","perl"],"created_at":"2024-11-19T00:45:46.427Z","updated_at":"2025-12-29T02:13:19.332Z","avatar_url":"https://github.com/Richie765.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"psync\n=====\n\nBidirectional File Synchronizer written in Perl.\n\n\nUsage\n=====\n\n```\npsync [-dv] [options] \u003croot_1\u003e \u003croot_2\u003e\n    -v --verbose     Verbose\n    -d --debug       Debug output\n    --tag \u003ctagname\u003e  Metadata Tag\n```\n\nTwo roots are required, all options are optional.\n\nSimply specify two roots that you need to synchronize. A root can be\non the local filesystem e.g. `/home/user/path` or remote over ssh e.g. `user@host:/path`\n\n\nRemote Syncronization\n=====================\nTo synchronize with a remote location, the `psync` script needs to be in the path \non the remote system. The name of the script must be the same as the one used to initiate the \nsync.\n\nKeep in mind that when the `psync` script is updated, the remote script also needs to be updated.\n\nI recommend only using SSH Public Key Authentication to\navoid any password interactions. Make sure SSH authentication between the systems works\nproperly before using `psync`.\n\n\nMultidirectional sync\n======================\nUsing the `--tag` option it is possible to synchronize the same root to a multitude of other roots\nin any way you desire. You just have to specify a unique `tagname` for each unique\npair of roots (leg). Not specifying a `tagname` or using the same `tagname` on different legs \nwill result in unexpected syncronization problems.\n\n\nMetadata\n========\nMetadata that is needed to sync properly is stored in the `.psync` folder in each\nroot. \n\nWhen using the `--tag` option, additional metadata will be stored for each leg\nin the same `.psync` folder.\n\nKeep in mind that the metadata of both roots of a leg have to remain in sync. Normally this\nwill be the case so you don't need to worry about that. But when one of the roots is replaced\nby an older backup, the metadata becomes out of sync. This can result in some\nunexpected behavior including possible loss of some data. One way around this problem\nis to start using a new `tagname` after the leg became out of sync.\nThis will cause both roots to be merged and no data will be lost (conflicts may occur though).\nIf you expect only small differences between the two roots you can simply use the same `tagname`\n(or no `tagname`) as before, monitor the changes and make manual changes if needed. Make sure\nyou make a backup of both roots before syncing.\n\n\nExamples\n========\nJust synchronize two roots on localhost\n\n    psync /home/user/root1 /home/user/root2\n\nSynchronize a local root with a remote root\n\n    psync /home/user/root user@remote:/home/user/root\n\nSynchronize two remote roots\n\n    psync user@remote1:/home/user/root user@remote2:/home/user/root\n\nThree-way sync\n\n    psync --tag leg1 /home/user/root user@remote1:/home/user/root\n    psync --tag leg2 /home/user/root user@remote2:/home/user/root\n\n\nDesign Guidelines\n=================\nThis script was developed with the following ideas in mind, please maintain those ideas\nwhen submitting pull-requests.\n\n* The script should be a single file so it can be copied to other systems easily.\n* The module dependencies should be kept low, only core and a few non-exotic modules are used.\n* It should work with most Perl versions commonly in use (currently v5.10 is required)\n\n\nTODO and Known Issues\n=====================\n`psync` has been working for me without major problems for over a year so it should be fairly stable.\n\n* Only works on *NIX (only tested on OS X)\n* Empty directories and deleted directories are not syncronized. Directories are only created when needed to copy a file and never deleted.\n* Timestamps are not preserved or synchronized\n* Possibly implement multidirectional (more then 2 roots) sync, probably as a separate script\n* Improve code documentation\n* Conflicts (simultaneous changes in both roots) are not handled by the script. They are just displayed to be handled manually directly on the filesystem.\n* Eventhough `psync` is reasonably fast, it was not built for speed or efficiency rather it was made to be simple and reliable.\n* Build in check to ensure local and remote `psync` scripts are compatible.\n* Improve readability of the script output.\n* A temp file (in the format `.\u003cfilename\u003e.\u003cnumber\u003e`) could be left behind, probably when psync is interrupted during a transfer. This temp file will be synced on the next run (will be fixed in a while)\n* Implement a lockfile to enforce only one sync at a time\n\n\nInternals\n=========\n\n### Comparing of files\nWhen a file is changed on both roots and still has an equal size, it will be compared. A file will also be compared after being copied to ensure its integrety. Comparing is done using a SHA512 digest.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichie765%2Fpsync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frichie765%2Fpsync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichie765%2Fpsync/lists"}