Utilizzo di account non root con Znapzend

From RVM Wiki
Jump to navigation Jump to search

Server sorgente

  • Il server sorgente ha ip 1.2.3.4
  • Impostare il plan con lo user che si vuole usare sul server ricevente:
znapzendzetup edit DATA/test
...
dst_znapremote  = username04@znapremote.example.priv:BACKUP/znapzend/servername/test
dst_znapremote_plan= 7days=>1hour,30days=>2hours,90days=>1day,1year=>1week,10years=>1month
...

Server Destinazione

  • Creare lo user da usare:
adduser username
  • Copiare la chiave pubblica di root del server sorgente in .ssh/authorized_keys facendola precedere da
from=""1.2.3.4"
  • Sostituire .bashrc con
PATH="${PATH}":/sbin/:/usr/sbin:/usr/local/sbin
  • Creare il dataset padre
zfs create BACKUP/znapzend/servername
  • Impostare le permission:
zfs allow -u username create,destroy,mount,mountpoint,receive,userprop  BACKUP/znapzend/servername

Server Sorgente

  • Lanciare più volte pre creare i dataset
znapzend --autoCreation --runonce 
fino a quando non si ricevono più errori del tipo:
filesystem successfully created, but it may only be mounted by root