TrueNAS move dataset to another dataset

Moving data from one dataset to another within TrueNAS can be accomplished through a few methods, as the TrueNAS GUI does not provide a direct “move” function for data within datasets.

1. Using the Command Line Interface (CLI) via SSH:

This method offers the most direct control and is often the fastest for large amounts of data.

Code

    cp -r /mnt/pool/old_dataset/* /mnt/pool/new_dataset/

The -r flag ensures recursive copying of directories and their contents.

2. Using ZFS Commands (for entire datasets or snapshots):

Code

    zfs rename pool/old_dataset pool/new_parent_dataset/new_dataset_name

Code

    zfs send pool/old_dataset@snapshot_name | zfs receive destination_pool/new_dataset_name