Hi Guys,
I have some trouble executing the following command as planned task:
Code
read -r -d $'\0' line < <(find/srv/dev-disk-by-label-Data-RAID/@data/.@snapshots -maxdepth 1 -type d -printf'%T@ %p\0' | sort -z -n) && file="${line#* }" && btrfs subvolume delete $file
This ugly one-liner should delete the oldest snapshot on my Data-RAID. But when I'am trying to run this task, I get the following error message:
Code
OMV\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C; export SHELL=/bin/sh; sudo --shell --non-interactive --user=root -- read -r -d $'\0' line < <(find /srv/dev-disk-by-label-Data-RAID/@data/.@snapshots -maxdepth 1 -type d -printf '%T@ %p\0' | sort -z -n) && file="${line#* }" && btrfs subvolume delete $file 2>&1' with exit code '2': in /usr/share/openmediavault/engined/rpc/cron.inc:175
But, I dont't know where the problem is. Maybe you've got an idea ?!