Skip to main content

NB: mount.zfs

Вижу бэкап - не вижу препятствий ;)

Дано:

$ zfs get mountpoint,canmount,readonly storarray_ext/zrepl/sink_whale_zroot/whale/zroot/data/backup
NAME                                                          PROPERTY    VALUE       SOURCE
storarray_ext/zrepl/sink_whale_zroot/whale/zroot/data/backup  mountpoint  none        inherited from storarray_ext/zrepl/sink_whale_zroot/whale
storarray_ext/zrepl/sink_whale_zroot/whale/zroot/data/backup  canmount    on          default
storarray_ext/zrepl/sink_whale_zroot/whale/zroot/data/backup  readonly    off         default

Пробуем:

$ sudo zfs mount storarray_ext/zrepl/sink_whale_zroot/whale/zroot/data/backup
cannot mount 'storarray_ext/zrepl/sink_whale_zroot/whale/zroot/data/backup': no mountpoint set
$ sudo mount.zfs storarray_ext/zrepl/sink_whale_zroot/whale/zroot/data/backup /mnt/tmp
filesystem 'storarray_ext/zrepl/sink_whale_zroot/whale/zroot/data/backup' cannot be mounted using 'mount'.
Use 'zfs set mountpoint=legacy' or 'zfs mount storarray_ext/zrepl/sink_whale_zroot/whale/zroot/data/backup'.
See zfs(8) for more information.

Не взлетело. .zfs не доступен по понятным причинам.

Как добыть? Да вот так:

$ zfs list -t snapshot storarray_ext/zrepl/sink_whale_zroot/whale/zroot/data/backup
NAME                                                                                     USED  AVAIL     REFER  MOUNTPOINT
storarray_ext/zrepl/sink_whale_zroot/whale/zroot/data/backup@zrepl_20220804_182012_000     0B      -     1.66G  -
storarray_ext/zrepl/sink_whale_zroot/whale/zroot/data/backup@zrepl_20220804_192411_000     0B      -     1.66G  -
storarray_ext/zrepl/sink_whale_zroot/whale/zroot/data/backup@zrepl_20220804_202412_000     0B      -     1.66G  -
storarray_ext/zrepl/sink_whale_zroot/whale/zroot/data/backup@zrepl_20220804_205413_000     0B      -     1.66G  -
$ sudo mount.zfs storarray_ext/zrepl/sink_whale_zroot/whale/zroot/data/backup@zrepl_20220804_205413_000 /mnt/tmp
$ ls /mnt/tmp
bareos.tar.xz  create_backup.sh  curent  current  db  packages  pgdata.snapshot  scripts

Готово.