this post was submitted on 28 Jul 2023
4 points (83.3% liked)

ZFS

201 readers
1 users here now

A lemmy community for ZFS, Previously: The Zettabyte File System.

founded 2 years ago
MODERATORS
4
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/zfs
 

i clone one dataset (tank/a to tank/b) with zfs

and now i want to delete only parent (tank/a)

i wont to have only tank/b now

how to do it?

top 3 comments
sorted by: hot top controversial new old
[–] [email protected] 2 points 1 year ago (1 children)

I believe the way to do this is to promote the clone dataset using the zfs promote command

[–] [email protected] 1 points 1 year ago (1 children)

thx for sugestion

looks very promising src

# zfs create pool/project/production
  populate /pool/project/production with data
# zfs snapshot pool/project/production@today
# zfs clone pool/project/production@today pool/project/beta
  make changes to /pool/project/beta and test them
# zfs promote pool/project/beta
# zfs rename pool/project/production pool/project/legacy
# zfs rename pool/project/beta pool/project/production
  once the legacy version is no longer needed, it can be destroyed
# zfs destroy pool/project/legacy

not tested yet

[–] [email protected] 1 points 18 hours ago

worked as a charm exactly what I wanted