brainsciencecenter / salt

saltstack repositories for managing the brainsciencecenter's machines
0 stars 0 forks source link

mirror zfs snapshots directories #6

Open holderg opened 4 years ago

holderg commented 4 years ago

Want /backups to lead to a tree of snapshot directories /data/{dataset}/.zfs/snapshots => /backups/{dataset}/

holderg commented 4 years ago

for i in $( mount | grep zfs | grep -v /mnt | awk '{print $3}') do echo ln -s $i/.zfs/snapshot /backups${i} done Need a way to make sure the links are maintained as datasets change

Assumptions are all zfs datasets are bind mounted into the file system from /mnt/something and .zfs is only 1 level under the bind mounts.