Hi all,
I'm having some trouble with a cloud sync task on 11.3. For context, I'm trying to backup some nextcloud files & database with a cloud sync task. The cloud sync task fails when the instance is in use, however this can be remedied by putting the instance into maintenance mode. It seems like the cloud sync task pre and post scripts would be a good solution, execute a fairly simple command before:
and turn off after.
However, when I put this code in the pre-script and post-script fields the sync immediately fails and I receive the error "Pre-script failed with exit code 1" and the log indicates that it has to do with a git import error, e.g. "[Pre-script] ImportError: Bad git executable." (I'm happy to upload the full log message if it helps).
A git error seems out of place.. am I misunderstanding something about the pre and post script strings? Are they not shell scripts? The documentation seems a bit light, and I couldn't find anything searching the forums.
Thank you for your time!
I'm having some trouble with a cloud sync task on 11.3. For context, I'm trying to backup some nextcloud files & database with a cloud sync task. The cloud sync task fails when the instance is in use, however this can be remedied by putting the instance into maintenance mode. It seems like the cloud sync task pre and post scripts would be a good solution, execute a fairly simple command before:
Code:
#!/bin/sh iocage exec nextcloud su -m www -c "php /usr/local/www/nextcloud/occ maintenance:mode --on"
and turn off after.
However, when I put this code in the pre-script and post-script fields the sync immediately fails and I receive the error "Pre-script failed with exit code 1" and the log indicates that it has to do with a git import error, e.g. "[Pre-script] ImportError: Bad git executable." (I'm happy to upload the full log message if it helps).
A git error seems out of place.. am I misunderstanding something about the pre and post script strings? Are they not shell scripts? The documentation seems a bit light, and I couldn't find anything searching the forums.
Thank you for your time!