{"id":34577202,"url":"https://github.com/seletskiy/zbackup","last_synced_at":"2026-05-29T10:31:04.744Z","repository":{"id":35714217,"uuid":"39992140","full_name":"seletskiy/zbackup","owner":"seletskiy","description":"multithreading zfs backuper written on golang","archived":false,"fork":false,"pushed_at":"2015-07-16T08:08:12.000Z","size":576,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-12T08:57:15.043Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seletskiy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-31T07:14:44.000Z","updated_at":"2016-04-05T04:30:46.000Z","dependencies_parsed_at":"2022-09-15T23:13:22.783Z","dependency_job_id":null,"html_url":"https://github.com/seletskiy/zbackup","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/seletskiy/zbackup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seletskiy%2Fzbackup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seletskiy%2Fzbackup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seletskiy%2Fzbackup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seletskiy%2Fzbackup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seletskiy","download_url":"https://codeload.github.com/seletskiy/zbackup/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seletskiy%2Fzbackup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33648530,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"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":"2025-12-24T09:56:20.989Z","updated_at":"2026-05-29T10:31:04.739Z","avatar_url":"https://github.com/seletskiy.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"#####Use zbackup only for zfs versions, where next bugs are closed:\nhttps://github.com/zfsonlinux/zfs/issues/2652\n\nhttps://github.com/zfsonlinux/zfs/pull/2656\n\n###zbackup\n\nzbackup is a multithreading zfs backuping (via snapshots) tool\n\n\n###Installation:\nfrom sources:\n```bash\ngo get github.com/theairkit/runcmd\ngo get github.com/theairkit/zfs\ngit clone github.com/theairkit/zbackup .\ngo install\n```\n\nfor archlinux users there are PKGBUILD file:\n```bash\ngit clone https://github.com/theairkit/zbackup.git\ncd zbackup\ngit checkout pkgbuild-github\nmakepkg\n```\n\n###Description and examples\n\n####zbackup can run in two modes:\n#####command-line mode:\nin this mode zbackup perform backup filesystems,\nwhich have a user-defined zfs-property with value 'true'\n(colon in property name is part of his name;\nthis is zfs naming scheme for user-properties)\n```\nzfs list -H -o name,someprop: zroot/owl                 \nzroot/owl   -\n\nzfs set someprop:=true zroot/owl\nzfs list -H -o name,someprop: zroot/owl\nzroot/owl   true\n```\n\nafter setting this property to fs, you can run zbackup:\n```bash\nzbackup -u zbackup: --host 192.186.20.80 --user root --key /root/.ssh/id_rsa\n```\n\n#####configuration-file mode:\nin this mode zbackup performs backup filsystem, described\nin config file ('-c' key)\n\nconfiguration file have a TOML format and very simple:\n```bash\ncat /etc/zbackup/zbackup.conf\n```\n\n```toml\nuser           = \"root\"\nhost           = \"192.168.20.80:22\"\nkey            = \"/root/.ssh/id_rsa\"\nmax_io_threads = 1\n\n[[backup]]\nrecursive      = true\nexpire_hours   = \"1h\"\nlocal          = \"zroot/src\"\nremote_root    = \"zroot\"\n...\n[[backup]]\n...\n[[backup]]\n```\nIn remote_root you can specify:\n- zfs pool name;\n- zfs fs name: if not exists, zbackup will try to create it;\n\nafter creating configuration file, check config, start dry-run,\nand then perform zbackup:\n```bash\nzbackup -c /etc/zbackup/zbackup.conf -t\n14:53:45.955870 9892 INFO config ok\n\nzbackup -c /etc/zbackup/zbackup.conf --dry-run\n14:54:14.052290 9900 INFO --dry-run set, only show backup tasks:\n14:54:14.052345 9900 INFO zroot/src -\u003e 192.168.20.80:22 zroot/owl-zroot-src\n14:54:14.052357 9900 INFO zroot/src/blah -\u003e 192.168.20.80:22 zroot/owl-zroot-src-blah\n14:54:14.052366 9900 INFO zroot/src/host1 -\u003e 192.168.20.80:22 zroot/owl-zroot-src-host1\n\nzbackup -c /etc/zbackup/zbackup.conf -v debug\n14:56:16.782904 9951 INFO [0]: starting backup\n... log messages ...\n14:56:17.973803 9951 INFO [2]: backup done\n```\n\nAll command keys (some of them has a default values):\n```bash\nzbackup -h\nUsage:\n  zbackup -h\n  zbackup --version\n  zbackup [-c config]    [-t] [--dry-run] [-p pidfile] [-v loglevel] [-f logfile]\n  zbackup -u zfsproperty [-t] [--dry-run] [-p pidfile] [-v loglevel] [-f logfile]\n  --host host [--user user] [--key key] [--iothreads num] [--remote fs] [--expire hours]\n\nOptions:\n  -h               this help\n  --version        show version and exit\n  -c config        configuration-based backup [default: /etc/zbackup/zbackup.conf]\n  -t               test configuration and exit\n  --dry-run        show fs will be backup and exit\n  -p pidfile       set pidfile [default: /var/run/zbackup.pid]\n  -v loglevel      set loglevel: info, debug [default: info]\n  -f logfile       set logfile [default: stderr]\n  -u zfsproperty   property-based backup\n  --host host      set backup host ${hostname}:${port}\n  --user user      set backup user [default: root]\n  --key key        set keyfile [default: /root/.ssh/id_rsa]\n  --iothreads num  set max parallel tasks [default: 1]\n  --remote fs      set remote root fs [default: 'zroot']\n  --expire hours   set expire time in hours or 'lastone' [default: 24h]\n```\n\n####Some internals\n* zbackup parse config (or command-linme options) and create backup tasks\n* based on max iothreads option, run this tasks in parallel\n\nFor every backup task:\n* check for local fs snapshot with name: 'fs@zbackup_curr'\n\n* if snapshot not exists - assume, that we run first time:\n * create snapshot 'fs@zbackup_curr'\n * local: zfs send fs@zbackup_curr\n * remote: zfs recv $remote_root/$local_root-$fs@timestamp\n * set 'readonly=on' for remote fs\n * set 'zbackup: true' for remote snapshot\n\n* if 'fs@zbackup_curr'  exists:\n * create snapshot 'fs@zbackup_new'\n * local: zfs send -i fs@zbackup_new fs@zbackup@curr\n * remote: zfs recv zfs recv $remote_root/$local_root-$fs@timestamp\n * set 'zbackup: true' for remote snapshot\n\n* run cleanup:\n * by 'lastone': delete all remote snapshots with 'zbackup=true' for this fs, except last one\n * by expire time: delete all remote snapshots, which created ealry that expire\n\n* rotate local snapshots:\n * delete local:'fs@zbackup_curr'\n * rename local:'fs@zbackup_new' to 'fs@zbackup_curr'\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseletskiy%2Fzbackup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseletskiy%2Fzbackup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseletskiy%2Fzbackup/lists"}