Skip to content

Instantly share code, notes, and snippets.

@sporkus
sporkus / notes.md
Created November 11, 2022 04:44
Exposing zfs snapshot to windows previous version using samba vfs_shadow_copy2

Exposing zfs snapshot to windows previous version using samba vfs_shadow_copy2

This was much trickier than I had originally anticipated and have spent a few hours testing.

The config from samba wiki absolutely works, but it wasn't ranked higher in search engine and it's not general enough. https://github.com/zfsonlinux/zfs-auto-snapshot/wiki/Samba

Tested on ubuntu 22.04LTS, samba 4.15.9 and windows 11.

TLDR

@Mikesco3
Mikesco3 / remote_syncoid_as_unprivilleged_user_README.md
Last active March 22, 2022 07:33 — forked from csarn/README.md
ZFS pull backup with minimal permissions

Usage

1. On system that should be backed up

create a user called zfsbackup

useradd zfsbackup --create-home --system
mkdir -p /home/zfsbackup/{.ssh,.local/bin}
chown zfsbackup:zfsbackup /home/zfsbackup --recursive

add a restricted list of commands allowed by this user

@csarn
csarn / README.md
Last active May 19, 2024 20:21
ZFS pull backup with minimal permissions

Usage

on system that should be backed up

  • put "restrict_commands.sh" in /usr/local/bin and make it executable
  • install ts, lzop and optionally mbuffer
useradd zfsbackup --create-home --system
mkdir /home/zfsbackup/.ssh
zfs allow -u zfsbackup send,hold tank/dataset
echo 'restrict,command="restrict_commands.sh" ssh-ed25519 ...' > /home/zfsbackup/.ssh/authorized_keys