Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zrep2 (bash) not working via cronjob #190

Open
HWesterhof opened this issue Apr 2, 2022 · 1 comment
Open

zrep2 (bash) not working via cronjob #190

HWesterhof opened this issue Apr 2, 2022 · 1 comment

Comments

@HWesterhof
Copy link

I used the script from here: https://github.com/bolthole/zrep/blob/zrep2/zrep

When run from SSH shell, no issues here:

root@proxmox:~# pwd
/root
root@proxmox:~# whoami
root
root@proxmox:~# /usr/sbin/zrep -S zfs-ssd/subvol-100-disk-0
sending zfs-ssd/subvol-100-disk-0@zrep_000004 to localhost:zfs-hd/subvol-100-disk-0
Expiring zrep snaps on zfs-ssd/subvol-100-disk-0
Also running expire on localhost:zfs-hd/subvol-100-disk-0 now...
Expiring zrep snaps on zfs-hd/subvol-100-disk-0

But when I try using a cronjob:

0 */12 * * * /usr/sbin/zrep -S zfs-ssd/subvol-100-disk-0

WARNING: old ZFS version detected with no depth protection
WARNING: You may not nest zrep managed filesystems
/usr/sbin/zrep: line 1999: zfs: command not found
Error: zfs-ssd/subvol-100-disk-0 not master. Cannot sync

More info:

root@proxmox:~# cat /etc/debian_version
11.1
root@proxmox:~# bash --version
bash --version
GNU bash, version 5.1.4(1)-release (x86_64-pc-linux-gnu)

Also added this line to my /root/.bashrc file, with no effect:

export PATH="/usr/sbin:$PATH"

@ppbrown
Copy link
Member

ppbrown commented Apr 3, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants