{"id":19451831,"url":"https://github.com/skoef/zfsync","last_synced_at":"2025-08-10T03:04:52.683Z","repository":{"id":139186165,"uuid":"47142533","full_name":"skoef/zfsync","owner":"skoef","description":"remote ZFS replication made easy","archived":false,"fork":false,"pushed_at":"2021-02-21T08:31:26.000Z","size":31,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-23T17:50:01.704Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/skoef.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-11-30T19:58:06.000Z","updated_at":"2025-02-21T14:40:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"0bc18759-705b-41a1-8e35-a10de807231c","html_url":"https://github.com/skoef/zfsync","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/skoef/zfsync","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skoef%2Fzfsync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skoef%2Fzfsync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skoef%2Fzfsync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skoef%2Fzfsync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skoef","download_url":"https://codeload.github.com/skoef/zfsync/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skoef%2Fzfsync/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269668187,"owners_count":24456495,"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","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-10T16:43:11.620Z","updated_at":"2025-08-10T03:04:52.663Z","avatar_url":"https://github.com/skoef.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zfsync\n**remote ZFS replication made easy**\n\nUsing ZFS opens up the really cool possibility to send snapshots to remote ZFS enabled servers, but managing synchronization of your snapshots can turn out more difficult. `zfsync` makes keeping these snapshots in sync easy.\n\nIt offers a purely in shell written script, and works without any dependencies on FreeBSD and \\*Solaris systems.\n\n##TL;DR:\n\n`zfsync -H remote.host -T tank/backups/myhost zroot/precious/data`\n\nsyncs all filesystems from `zroot/precious/data` to the remote host.\n\n##Usage:\n```\nzfsync [-dhiPq] [-U target_user] [-I identity_file] [-k retention]\n       [-K retention] -H target_host -T target_zfs\n       source_zfs\n\n    source_zfs is the filesystem that should be synced to a remote host\n\nOptions:\n    -d                   enable debugging (negates -q)\n    -B                   even when mbuffer is detected, don't buffer\n    -h                   show you this help page\n    -H target_host       host to send snapshots to [required]\n    -i                   send incremental stream between local and remote\n                         snapshot instead of a stream package of all\n                         intermediary snapshots\n    -I identity_file     use this key for authentication\n    -k local_retention   after synchronizing, apply local retention\n    -K remote_retention  after synchronizing, apply remote retention\n    -P                   do not set user properties on remote end\n    -q                   be more quiet\n    -T target_zfs        ZFS on target host to send snapshots to [required]\n    -U target_user       alternative user to authenticate as on remote host\n```\n\n##Preparing remote host\n\nCurrently, `zfsync` should just work as long as the remote host is running FreeBSD or \\*Solaris and you have access to it over SSH. While it is certainly possible, you really shouldn't use the `root` user for receiving the ZFS snapshots (arguably for no SSH access at all, actually). Instead, set up a non-privileged user, most preferably with public key access, on the remote host. Here is a FreeBSD example:\n\n**remote host:**\n```\npw useradd -n zfsync -d /home/zfsync -m -w random -s /bin/sh\nmkdir ~zfsync/.ssh/\nssh-keygen -f ~zfsync/.ssh/id_rsa\nchown -R zfsync ~zfsync/.ssh\nzfs allow -u zfsync create,mount,receive tank/backups/myhost\n```\nto create non-privileged user `zfsync`, set up a public/private key and give user `zfsync` minimal permissions for receiving ZFS snapshots `tank/backups/myhost` (`zfsync` will warn you otherwise). The public key `~zfsync/.ssh/id_rsa.pub` should be copied to the source host via a secure channel, so it could be pointed to with `-I` while using `-U zfsync` on the next sync. You should add a strong passphrase to the key file, and use ssh-agent so you can cron syncing your filesystems. If you want to keep remote retention, make sure user `zfsync` has `destroy` permissions as well on the remote filesystem.\n\n##Known issues\n- has to be tested on GNU/Linux with ZFSOnLinux\n- zfsync does not support multiple `source_zfs` arguments yet\n- on \\*Solaris, `/bin/sh` is symlinked to `ksh` on some systems, which breaks `zfsync`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskoef%2Fzfsync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskoef%2Fzfsync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskoef%2Fzfsync/lists"}