Hello dear forum,
Initial situation / requirements :
I would like to create a bash script for backups on snapshot basis.
The USB hard disk should not be permanently connected, but when the script starts via cronjob and at that moment the hard disk is available, the corresponding ZPOOL should be imported.
In comparison to https://esc-now.de/_/zfs-offsite-backup-auf-eine-externe-festplatte/?lang=en
I am aware that the script in the link is based on Freenas - I am using a current TrueNAS-12.0-U7 now.
The script should run as non-root user and also without "sudo".
Problems / questions:
Does this work with current Truenas at all ? Somehow I have the feeling, as if the CLI should be deliberately not used anymore.
I already tried everything with "Delegating ZFS Permissions" (https://docs.oracle.com/cd/E19253-01/819-5461/gfkco/index.html).
I already fail when importing and exporting the ZPOOLS.
---
Code:
# IMPORT ZPOOL, only works with "sudo".
truenas% zpool import backup
cannot import 'backup': no such pool available
# EXPORT ZPOOL, works only with "sudo
truenas% zpool export backup
cannot unmount '/mnt/backup/data': unmount failed
---
Thanks and best regards
Banane
Initial situation / requirements :
I would like to create a bash script for backups on snapshot basis.
The USB hard disk should not be permanently connected, but when the script starts via cronjob and at that moment the hard disk is available, the corresponding ZPOOL should be imported.
In comparison to https://esc-now.de/_/zfs-offsite-backup-auf-eine-externe-festplatte/?lang=en
I am aware that the script in the link is based on Freenas - I am using a current TrueNAS-12.0-U7 now.
The script should run as non-root user and also without "sudo".
Problems / questions:
Does this work with current Truenas at all ? Somehow I have the feeling, as if the CLI should be deliberately not used anymore.
I already tried everything with "Delegating ZFS Permissions" (https://docs.oracle.com/cd/E19253-01/819-5461/gfkco/index.html).
I already fail when importing and exporting the ZPOOLS.
---
Code:
# IMPORT ZPOOL, only works with "sudo".
truenas% zpool import backup
cannot import 'backup': no such pool available
# EXPORT ZPOOL, works only with "sudo
truenas% zpool export backup
cannot unmount '/mnt/backup/data': unmount failed
---
Thanks and best regards
Banane