Revert iocage dataset to a snapshot

trinxie

Dabbler
Joined
Feb 7, 2013
Messages
28
Hello
Well i have realized that I lack some knowledge regarding snapshot/dataset recovery.
I have setup some Jails, struggling with a Jail and I now want to revert back the dataset iocage to a snapshot made yesterday.
I cannot just rollback, as the snapshot I want to rollback to is not the latest.

I found the .zfs folder in the iocage dataset and the contents in a snaphot.

As I am getting rusty, I want to check what is the best way to restore my iocage dataset to a point in time (e.g.) yesterday.
I am thinking about rm -R * (in Mainpool/iocage) and then cp -R MainPool/iocage@auto-2022-10-06_21-00_hourly/* .
Does not feel right concerning permissions etc. I feel that I should use zfs send/receive... stumbling

Sorry for asking, I just need a hint. Google did not solve my case today.
/Jörgen
 

trinxie

Dabbler
Joined
Feb 7, 2013
Messages
28
I have created a clone dataset of the "SOURCE" snapshot
I suppose rsync is the way to go but I cannot get added files in DEST to be deleted:
Code:
rsync -a SOURCE/* DEST--delete-after


Am I on the right track here?
 
Top