1
0
zfs-test/bin/reorganize-encrypted-nested
2024-01-28 09:53:36 -08:00

11 lines
418 B
Bash
Executable File

#!/bin/sh
rm -vrf /tank/test/encrypted/own-dataset
rm -vrf /tank/test/encrypted/ver
mv -v /tank/test/encrypted/should-be-root/* /tank/test/encrypted/
rmdir /tank/test/encrypted/should-be-root
zfs snapshot tank/test/encrypted@proper-root
zfs rename tank/test/encrypted tank/test/encrypted-old
zfs rename tank/test/encrypted-new tank/test/encrypted
zfs rename tank/test/encrypted-old tank/test/encrypted/should-be-root