{"id":13550948,"url":"https://github.com/ubuntu/zsys","last_synced_at":"2025-04-06T01:09:14.992Z","repository":{"id":35268589,"uuid":"192364547","full_name":"ubuntu/zsys","owner":"ubuntu","description":"ZSys daemon and client for zfs systems","archived":false,"fork":false,"pushed_at":"2024-04-19T12:47:00.000Z","size":2208,"stargazers_count":300,"open_issues_count":65,"forks_count":38,"subscribers_count":24,"default_branch":"master","last_synced_at":"2025-03-28T19:19:38.831Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ubuntu.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":"2019-06-17T14:39:26.000Z","updated_at":"2025-02-16T06:07:49.000Z","dependencies_parsed_at":"2024-01-04T10:42:47.277Z","dependency_job_id":"ac7b58b3-6bd1-43da-a9ad-3b6e63dc3aca","html_url":"https://github.com/ubuntu/zsys","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubuntu%2Fzsys","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubuntu%2Fzsys/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubuntu%2Fzsys/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubuntu%2Fzsys/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ubuntu","download_url":"https://codeload.github.com/ubuntu/zsys/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247419860,"owners_count":20936012,"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":[],"created_at":"2024-08-01T12:01:40.072Z","updated_at":"2025-04-06T01:09:14.977Z","avatar_url":"https://github.com/ubuntu.png","language":"Go","funding_links":[],"categories":["Go","others","🛠️ ZFS tools"],"sub_categories":["ZFS other tools"],"readme":"# ZSys\nZSys daemon and client for zfs systems\n\n[![Code quality](https://github.com/ubuntu/zsys/workflows/CI/badge.svg)](https://github.com/ubuntu/zsys/actions?query=workflow%3ACI)\n[![Go Report Card](https://goreportcard.com/badge/ubuntu/zsys)](https://goreportcard.com/report/ubuntu/zsys)\n[![codecov](https://codecov.io/gh/ubuntu/zsys/branch/master/graph/badge.svg)](https://codecov.io/gh/ubuntu/zsys)\n[![License](https://img.shields.io/badge/License-GPL3.0-blue.svg)](https://github.com/ubuntu/zsys/blob/master/LICENSE)\n\nZSys is a Zfs SYStem tool targeting an enhanced ZOL experience.\n\nIt allows running multiple ZFS systems in parallel on the same machine, get automated snapshots, managing complex zfs dataset layouts separating user data from system and persistent data, and more.\n\n## Documentation\n\nYou can find a whole series of blog posts explaining in details the [internals and goals of ZSys](https://didrocks.fr/2020/05/21/zfs-focus-on-ubuntu-20.04-lts-whats-new/).\n\n## Usage\n\n### User commands\n\n#### zsysctl\n\nZFS SYStem integration control zsys daemon\n\n##### Synopsis\n\nZfs SYStem tool for an enhanced ZFS on Linux experience.\n It allows running multiple ZFS system in parallels on the same machine,\n get automated snapshots, managing complex zfs dataset layouts separating\n user data from system and persistent data, and more.\n\n```\nzsysctl COMMAND [flags]\n```\n\n##### Options\n\n```\n  -h, --help            help for zsysctl\n  -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output\n```\n\n#### zsysctl completion\n\nGenerates completion scripts (will attempt to automatically detect shell)\n\n##### Synopsis\n\nTo load completions:\nNOTE: When shell type isn't defined shell will be automatically identified based on the $SHELL environment vairable\n\nBash:\n\n```bash\nsource \u003c(zsysctl completion bash)\n\n# To load completions for each session, execute once:\n# Linux:\nzsysctl completion bash \u003e /etc/bash_completion.d/zsysctl\n# macOS:\nzsysctl completion bash \u003e /usr/local/etc/bash_completion.d/zsysctl\n```\n\nZsh:\n```zsh\n# If shell completion is not already enabled in your environment,\n# you will need to enable it.  You can execute the following once:\n\necho \"autoload -U compinit; compinit\" \u003e\u003e ~/.zshrc\n\n# To load completions for each session, execute once:\nzsysctl completion zsh \u003e \"${fpath[1]}/_zsysctl\"\n\n# You will need to start a new shell for this setup to take effect.\n```\n\nPowerShell:\n\n```powershell\nzsysctl completion powershell | Out-String | Invoke-Expression\n\n# To load completions for every new session, run:\nzsysctl completion powershell \u003e zsysctl.ps1\n# and source this file from your PowerShell profile.\n```\n\n```\nzsysctl completion [bash|zsh|powershell] [flags]\n```\n\n##### Options\n\n```\n  -h, --help   help for completion\n```\n\n##### Options inherited from parent commands\n\n```\n  -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output\n```\n\n#### zsysctl list\n\nList all the machines and basic information.\n\n##### Synopsis\n\nAlias of zsysctl machine list. List all the machines and basic information.\n\n```\nzsysctl list [flags]\n```\n\n##### Options\n\n```\n  -h, --help   help for list\n```\n\n##### Options inherited from parent commands\n\n```\n  -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output\n```\n\n#### zsysctl machine\n\nMachine management\n\n```\nzsysctl machine COMMAND [flags]\n```\n\n##### Options\n\n```\n  -h, --help   help for machine\n```\n\n##### Options inherited from parent commands\n\n```\n  -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output\n```\n\n#### zsysctl machine list\n\nList all the machines and basic information.\n\n```\nzsysctl machine list [flags]\n```\n\n##### Options\n\n```\n  -h, --help   help for list\n```\n\n##### Options inherited from parent commands\n\n```\n  -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output\n```\n\n#### zsysctl machine show\n\nShows the status of the machine.\n\n```\nzsysctl machine show [MachineID] [flags]\n```\n\n##### Options\n\n```\n      --full   Give more detail informations on each machine.\n  -h, --help   help for show\n```\n\n##### Options inherited from parent commands\n\n```\n  -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output\n```\n\n#### zsysctl save\n\nSaves the current state of the machine. By default it saves only the user state. state_id is generated if not provided.\n\n##### Synopsis\n\nAlias of zsysctl state save. Saves the current state of the machine. By default it saves only the user state. state_id is generated if not provided.\n\n```\nzsysctl save [state id] [flags]\n```\n\n##### Options\n\n```\n      --auto                 Signal this is an automated request triggered by script\n  -h, --help                 help for save\n      --no-update-bootmenu   Do not update bootmenu on system state save\n  -s, --system               Save complete system state (users and system)\n  -u, --user string          Save the state for a given user or current user if empty\n```\n\n##### Options inherited from parent commands\n\n```\n  -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output\n```\n\n#### zsysctl service\n\nService management\n\n```\nzsysctl service COMMAND [flags]\n```\n\n##### Options\n\n```\n  -h, --help   help for service\n```\n\n##### Options inherited from parent commands\n\n```\n  -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output\n```\n\n#### zsysctl service dump\n\nDumps the current state of zsys.\n\n```\nzsysctl service dump [flags]\n```\n\n##### Options\n\n```\n  -h, --help   help for dump\n```\n\n##### Options inherited from parent commands\n\n```\n  -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output\n```\n\n#### zsysctl service gc\n\nRun daemon state saves garbage collection.\n\n```\nzsysctl service gc [flags]\n```\n\n##### Options\n\n```\n  -a, --all    Collects all the datasets including manual snapshots and clones.\n  -h, --help   help for gc\n```\n\n##### Options inherited from parent commands\n\n```\n  -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output\n```\n\n#### zsysctl service loglevel\n\nSets the logging level of the daemon.\n\n```\nzsysctl service loglevel 0|1|2 [flags]\n```\n\n##### Options\n\n```\n  -h, --help   help for loglevel\n```\n\n##### Options inherited from parent commands\n\n```\n  -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output\n```\n\n#### zsysctl service refresh\n\nRefreshes machines states.\n\n```\nzsysctl service refresh [flags]\n```\n\n##### Options\n\n```\n  -h, --help   help for refresh\n```\n\n##### Options inherited from parent commands\n\n```\n  -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output\n```\n\n#### zsysctl service reload\n\nReloads daemon configuration.\n\n```\nzsysctl service reload [flags]\n```\n\n##### Options\n\n```\n  -h, --help   help for reload\n```\n\n##### Options inherited from parent commands\n\n```\n  -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output\n```\n\n#### zsysctl service status\n\nShows the status of the daemon.\n\n```\nzsysctl service status [flags]\n```\n\n##### Options\n\n```\n  -h, --help   help for status\n```\n\n##### Options inherited from parent commands\n\n```\n  -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output\n```\n\n#### zsysctl service stop\n\nStops zsys daemon.\n\n```\nzsysctl service stop [flags]\n```\n\n##### Options\n\n```\n  -h, --help   help for stop\n```\n\n##### Options inherited from parent commands\n\n```\n  -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output\n```\n\n#### zsysctl service trace\n\nStart profiling until you exit this command yourself or when duration is done. Default is CPU profiling with a 30s timeout.\n\n```\nzsysctl service trace [flags]\n```\n\n##### Options\n\n```\n      --duration int    Duration of the capture. Default is 30 seconds. (default 30)\n  -h, --help            help for trace\n  -o, --output string   Dump the trace to a file. Default is ./zsys.\u003ctrace-type\u003e.pprof\n  -t, --type string     Type of profiling cpu or mem. Default is cpu. (default \"cpu\")\n```\n\n##### Options inherited from parent commands\n\n```\n  -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output\n```\n\n#### zsysctl show\n\nShows the status of the machine.\n\n##### Synopsis\n\nAlias of zsysctl machine show. Shows the status of the machine.\n\n```\nzsysctl show [MachineID] [flags]\n```\n\n##### Options\n\n```\n      --full   Give more detail informations on each machine.\n  -h, --help   help for show\n```\n\n##### Options inherited from parent commands\n\n```\n  -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output\n```\n\n#### zsysctl state\n\nMachine state management\n\n```\nzsysctl state COMMAND [flags]\n```\n\n##### Options\n\n```\n  -h, --help   help for state\n```\n\n##### Options inherited from parent commands\n\n```\n  -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output\n```\n\n#### zsysctl state remove\n\nRemove the current state of the machine. By default it removes only the user state if not linked to any system state.\n\n```\nzsysctl state remove [state id] [flags]\n```\n\n##### Options\n\n```\n      --dry-run       Dry run, will not remove anything\n  -f, --force         Force removing, even if dependencies are found\n  -h, --help          help for remove\n  -s, --system        Remove system state (system and users linked to it)\n  -u, --user string   Remove the state for a given user or current user if empty\n```\n\n##### Options inherited from parent commands\n\n```\n  -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output\n```\n\n#### zsysctl state save\n\nSaves the current state of the machine. By default it saves only the user state. state_id is generated if not provided.\n\n```\nzsysctl state save [state id] [flags]\n```\n\n##### Options\n\n```\n      --auto                 Signal this is an automated request triggered by script\n  -h, --help                 help for save\n      --no-update-bootmenu   Do not update bootmenu on system state save\n  -s, --system               Save complete system state (users and system)\n  -u, --user string          Save the state for a given user or current user if empty\n```\n\n##### Options inherited from parent commands\n\n```\n  -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output\n```\n\n#### zsysctl version\n\nReturns version of client and server\n\n```\nzsysctl version [flags]\n```\n\n##### Options\n\n```\n  -h, --help   help for version\n```\n\n##### Options inherited from parent commands\n\n```\n  -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output\n```\n\n#### zsysd\n\nZFS SYStem integration daemon\n\n##### Synopsis\n\nZfs SYStem daemon for an enhanced ZFS on Linux experience.\n It allows running multiple ZFS system in parallels on the same machine,\n get automated snapshots, managing complex zfs dataset layouts separating\n user data from system and persistent data, and more.\n\n```\nzsysd [flags]\n```\n\n##### Options\n\n```\n  -h, --help            help for zsysd\n  -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output\n```\n\n#### zsysd completion\n\nGenerates completion scripts (will attempt to automatically detect shell)\n\n##### Synopsis\n\nTo load completions:\nNOTE: When shell type isn't defined shell will be automatically identified based on the $SHELL environment vairable\n\nBash:\n\n```bash\nsource \u003c(zsysd completion bash)\n\n# To load completions for each session, execute once:\n# Linux:\nzsysd completion bash \u003e /etc/bash_completion.d/zsysd\n# macOS:\nzsysd completion bash \u003e /usr/local/etc/bash_completion.d/zsysd\n```\n\nZsh:\n```zsh\n# If shell completion is not already enabled in your environment,\n# you will need to enable it.  You can execute the following once:\n\necho \"autoload -U compinit; compinit\" \u003e\u003e ~/.zshrc\n\n# To load completions for each session, execute once:\nzsysd completion zsh \u003e \"${fpath[1]}/_zsysd\"\n\n# You will need to start a new shell for this setup to take effect.\n```\n\nPowerShell:\n\n```powershell\nzsysd completion powershell | Out-String | Invoke-Expression\n\n# To load completions for every new session, run:\nzsysd completion powershell \u003e zsysd.ps1\n# and source this file from your PowerShell profile.\n```\n\n```\nzsysd completion [bash|zsh|powershell] [flags]\n```\n\n##### Options\n\n```\n  -h, --help   help for completion\n```\n\n##### Options inherited from parent commands\n\n```\n  -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output\n```\n\n### System commands\n\nThose commands are hidden from help and should primarily be used by the system itself.\n\n#### zsysctl boot\n\nEnsure that the right datasets are ready to be mounted and committed during early boot\n\n```\nzsysctl boot COMMAND [flags]\n```\n\n##### Options\n\n```\n  -h, --help            help for boot\n  -p, --print-changes   Display if any zfs datasets have been modified to boot\n```\n\n##### Options inherited from parent commands\n\n```\n  -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output\n```\n\n#### zsysctl boot commit\n\nCommit system and user datasets states as a successful boot\n\n```\nzsysctl boot commit [flags]\n```\n\n##### Options\n\n```\n  -h, --help   help for commit\n```\n\n##### Options inherited from parent commands\n\n```\n  -p, --print-changes   Display if any zfs datasets have been modified to boot\n  -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output\n```\n\n#### zsysctl boot prepare\n\nPrepare boot by ensuring correct system and user datasets are switched on and off\n\n```\nzsysctl boot prepare [flags]\n```\n\n##### Options\n\n```\n  -h, --help   help for prepare\n```\n\n##### Options inherited from parent commands\n\n```\n  -p, --print-changes   Display if any zfs datasets have been modified to boot\n  -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output\n```\n\n#### zsysctl boot update-lastused\n\nUpdate last used timestamp\n\n```\nzsysctl boot update-lastused [flags]\n```\n\n##### Options\n\n```\n  -h, --help   help for update-lastused\n```\n\n##### Options inherited from parent commands\n\n```\n  -p, --print-changes   Display if any zfs datasets have been modified to boot\n  -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output\n```\n\n#### zsysctl boot update-menu\n\nUpdate system boot menu\n\n```\nzsysctl boot update-menu [flags]\n```\n\n##### Options\n\n```\n      --auto   Signal this is an automated request triggered by script\n  -h, --help   help for update-menu\n```\n\n##### Options inherited from parent commands\n\n```\n  -p, --print-changes   Display if any zfs datasets have been modified to boot\n  -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output\n```\n\n#### zsysctl userdata\n\nUser datasets creation and rename\n\n```\nzsysctl userdata COMMAND [flags]\n```\n\n##### Options\n\n```\n  -h, --help   help for userdata\n```\n\n##### Options inherited from parent commands\n\n```\n  -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output\n```\n\n#### zsysctl userdata create\n\nCreate a new home user dataset via an user dataset (if doesn't exist) creation\n\n```\nzsysctl userdata create USER HOME_DIRECTORY [flags]\n```\n\n##### Options\n\n```\n  -h, --help   help for create\n```\n\n##### Options inherited from parent commands\n\n```\n  -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output\n```\n\n#### zsysctl userdata dissociate\n\ndissociate current user data from current system but preserve history\n\n```\nzsysctl userdata dissociate USER [flags]\n```\n\n##### Options\n\n```\n  -h, --help     help for dissociate\n  -r, --remove   Empty home directory content if not associated to any machine state\n```\n\n##### Options inherited from parent commands\n\n```\n  -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output\n```\n\n#### zsysctl userdata set-home\n\nRename a user's home directory via renaming corresponding user dataset\n\n```\nzsysctl userdata set-home OLD_HOME NEW_HOME [flags]\n```\n\n##### Options\n\n```\n  -h, --help   help for set-home\n```\n\n##### Options inherited from parent commands\n\n```\n  -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output\n```\n\n#### zsysd boot-prepare\n\nPrepare boot by ensuring correct system and user datasets are switched on and off, synchronously\n\n```\nzsysd boot-prepare [flags]\n```\n\n##### Options\n\n```\n  -h, --help   help for boot-prepare\n```\n\n##### Options inherited from parent commands\n\n```\n  -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubuntu%2Fzsys","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fubuntu%2Fzsys","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubuntu%2Fzsys/lists"}