How to mount replicated dataset without breaking further replication? #725
Replies: 2 comments 11 replies
-
AFAIK there's no good way to have it permanently mounted. For singular recovery purposes one can use the readonly flag and/or roll the dataset back after unmounting. "Why can't is just have it permanently mounted in readonly mode?" - IIRC the problem here is that mounting children inside the dataset will either create a directory (modification of the dataset!) for the mountpoint or fail to do that and thus fail mounting - neither are what you want, probably. |
Beta Was this translation helpful? Give feedback.
-
Started working with zrepl last night and found a way to keep the snapshot permanently mounted and visible on the backup server. This works great on Debian 12 with ZFS 2.1.11 and zrepl 0.61. The trick:
Once those options are set, simply mount the dataset on the target, and you will see the data. Here are the commands I used when the remote dataset is named
Adding the readonly=yes option to the parent ensures any other zrepl volume will get the same readonly setting. The best part: the mount point always has the data from the most recent snapshot. If you need data from another snapshot, simply go to /backup/data-01/.zfs/snapshot/<snapshot_dir_name>). Finally, if you need a read-write copy of the data, simply do Hope this helps. |
Beta Was this translation helpful? Give feedback.
-
I've looked through the documentation but I can't find anything that mentions how to mount or otherwise access the replicated dataset without breaking the replication process.
Once before I tried mounting the filesystem but I recall this broke the replication process, because it couldn't update the dataset once it had been modified due to the mount.
Are there instructions anywhere (ideally at https://zrepl.github.io) that explains the correct way to access a replicated dataset/snapshot in such a way that the data continues to be replicated without any problems?
Beta Was this translation helpful? Give feedback.
All reactions