view docs/man/man8/fzfs-create-tree.rst @ 649:4ee9a8042f4a

common.subr: _get_jail_from_path() now just returns when the jail is dying. But it prints the name of the jail if it is yet dying. Real error reporting must not consistently be done in the caller.
author Franz Glasner <fzglas.hg@dom66.de>
date Fri, 27 Sep 2024 21:21:34 +0200
parents b74c65ceab96
children
line wrap: on
line source

.. -*- coding: utf-8; indent-tabs-mode: nil; -*-

fzfs-create-tree
================

.. program:: fzfs create-tree


Synopsis
--------

**fzfs create-tree** [**-A**] [**-M** `mountpoint`] [**-n**] [**-p**] [**-u**] `source-dataset` `dest-dataset`

Description
-----------

Copy the ZFS filesystem structure that is rooted at `source-dataset`
to the destination rooted at `dest-dataset`.

The content of the filesystems is **not** copied. This is also true for
permissions and/or ACLs.

`dest-dataset` must not exist already.

By default some important dataset properties are copied from
the source tree to the destination. This includes `atime`,
`exec`, `setuid`, `compression`, `primarycache`, `sync` and
`readonly`. But they are copied *only* if are of type ``local`` in
the source.

By default `canmount` is also copied. But this can be modified with
options :option:`-A` and :option:`-p`.

The `mountpoint` property is not copied. Normally it will be inherited
as the ZFS rules for `dest-dataset` regarding its parent are applied.
This can be changed with :option:`-M mountpoint`. Child datasets always
will inherit their mountpoint from `dest-dataset`.


Options
-------

.. option:: -A

   Unconditionally set the ZFS property `canmount=noauto` for all
   created datasets in the destination tree. This option also overwrites
   option :option:`-p`.

.. option:: -M <mountpoint>

   Set the `mountpoint` property for the destination root `dest-dataset`
   to `mountpoint`. All children will be set to inherit it.

   If not given then the mountpoint will we inherited by normal ZFS
   inheritance from the destination's parent.

.. option:: -n

   Dry-run. Do not really create datasets but show what would be done.

.. option:: -p

   Copy the `canmount` property only from the source root to the destinaion
   root dataset This will be overwritten by the option :option:`-A`.

.. option:: -u

   Do not mount the newly created datasets when they are created.


Environment
-----------

All environment variables that affect :command:`zfs` are effective also.


See Also
--------

:manpage:`fzfs(8)`, :manpage:`fzfs-copy-tree(8)`